Skip to content
Snippets Groups Projects
Commit 703388ec authored by Joe Julian's avatar Joe Julian Committed by Joe Julian
Browse files

Fix broken GRANT when not ssl

if ssl_option is not False, mysql_grant.present adds "REQUIRE" to the
grant command but since all the ssl sub options are false or missing,
there is a null string appended to the requirements. This causes the
grant command to fail.

This tests to see if ssl or X509 are set. If they're not, it skips the
entire ssl_option section leaving ssl_option==False to prevent that
error.
parent c6674034
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,7 @@ include:
- grant: {{db['grants']|join(",")}}
- database: '{{ db['database'] }}.{{ db['table'] | default('*') }}'
- grant_option: {{ db['grant_option'] | default(False) }}
{% if 'ssl' in user or 'ssl-X509' in user %}
- ssl_option:
- SSL: {{ user['ssl'] | default(False) }}
{% if user['ssl-X509'] is defined %}
......@@ -93,6 +94,7 @@ include:
{% if user['ssl-CIPHER'] is defined %}
- CIPHER: {{ user['ssl-CIPHER'] }}
{% endif %}
{% endif %}
- user: {{ name }}
- host: '{{ host }}'
- connection_host: '{{ mysql_host }}'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment