Skip to content
Snippets Groups Projects
Commit 7a386578 authored by Nuno Esteves's avatar Nuno Esteves
Browse files

Allow the use of wildcards on a user's database/table names when defining grants.

parent 24d74d57
No related branches found
No related tags found
No related merge requests found
...@@ -97,6 +97,7 @@ include: ...@@ -97,6 +97,7 @@ include:
{% endif %} {% endif %}
- user: {{ name }} - user: {{ name }}
- host: '{{ host }}' - host: '{{ host }}'
- escape: {{ db['escape'] | default(True) }}
- connection_host: '{{ mysql_host }}' - connection_host: '{{ mysql_host }}'
- connection_user: '{{ mysql_salt_user }}' - connection_user: '{{ mysql_salt_user }}'
{% if mysql_salt_pass -%} {% if mysql_salt_pass -%}
......
...@@ -85,6 +85,7 @@ mysql: ...@@ -85,6 +85,7 @@ mysql:
databases: databases:
- database: foo - database: foo
grants: ['select', 'insert', 'update'] grants: ['select', 'insert', 'update']
escape: True
- database: bar - database: bar
grants: ['all privileges'] grants: ['all privileges']
bob: bob:
...@@ -96,9 +97,10 @@ mysql: ...@@ -96,9 +97,10 @@ mysql:
ssl-ISSUER: Name ssl-ISSUER: Name
ssl-CIPHER: Cipher ssl-CIPHER: Cipher
databases: databases:
- database: foo - database: "foo_%%"
grants: ['all privileges'] grants: ['all privileges']
grant_option: True grant_option: True
escape: False
- database: bar - database: bar
table: foobar table: foobar
grants: ['select', 'insert', 'update', 'delete'] grants: ['select', 'insert', 'update', 'delete']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment