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

This commit is contained in:
Nuno Esteves 2017-08-15 22:49:44 +01:00
parent 24d74d5731
commit 7a386578b7
2 changed files with 4 additions and 1 deletions

View file

@ -97,6 +97,7 @@ include:
{% endif %}
- user: {{ name }}
- host: '{{ host }}'
- escape: {{ db['escape'] | default(True) }}
- connection_host: '{{ mysql_host }}'
- connection_user: '{{ mysql_salt_user }}'
{% if mysql_salt_pass -%}

View file

@ -85,6 +85,7 @@ mysql:
databases:
- database: foo
grants: ['select', 'insert', 'update']
escape: True
- database: bar
grants: ['all privileges']
bob:
@ -96,9 +97,10 @@ mysql:
ssl-ISSUER: Name
ssl-CIPHER: Cipher
databases:
- database: foo
- database: "foo_%%"
grants: ['all privileges']
grant_option: True
escape: False
- database: bar
table: foobar
grants: ['select', 'insert', 'update', 'delete']