Skip to content
Snippets Groups Projects
Unverified Commit 8f2e6ad7 authored by N's avatar N Committed by GitHub
Browse files

Merge pull request #168 from nesteves/master

Allow the use of wildcards on a user's database/table names when defining grants.
parents 66c2d133 e540589c
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,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 -%}
......
......@@ -106,6 +106,7 @@ mysql:
databases:
- database: foo
grants: ['select', 'insert', 'update']
escape: True
- database: bar
grants: ['all privileges']
bob:
......@@ -117,9 +118,14 @@ mysql:
ssl-ISSUER: Name
ssl-CIPHER: Cipher
databases:
- database: foo
# https://github.com/saltstack/salt/issues/41178
# If you want to refer to databases using wildcards, turn off escape so
# the renderer does not escape them, enclose the string in '`' and
# use two '%'
- database: '`foo\_%%`'
grants: ['all privileges']
grant_option: True
escape: False
- database: bar
table: foobar
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