mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-16 01:30:25 +00:00
Merge pull request #29 from tiger-seo/master
allow to add users without password
This commit is contained in:
commit
8bff5e8aea
2 changed files with 8 additions and 2 deletions
|
@ -13,9 +13,11 @@ include:
|
|||
- host: '{{ user['host'] }}'
|
||||
{%- if user['password_hash'] is defined %}
|
||||
- password_hash: '{{ user['password_hash'] }}'
|
||||
{% else %}
|
||||
{%- elif user['password'] is defined and user['password'] != None %}
|
||||
- password: '{{ user['password'] }}'
|
||||
{% endif %}
|
||||
{%- else %}
|
||||
- allow_passwordless: True
|
||||
{%- endif %}
|
||||
- connection_host: localhost
|
||||
- connection_user: root
|
||||
- connection_pass: '{{ salt['pillar.get']('mysql:server:root_password', 'somepass') }}'
|
||||
|
|
|
@ -34,6 +34,10 @@ mysql:
|
|||
grants: ['all privileges']
|
||||
- database: bar
|
||||
grants: ['select', 'insert', 'update', 'delete']
|
||||
- name: nopassuser
|
||||
password: ~
|
||||
host: localhost
|
||||
databases: []
|
||||
|
||||
# Override any names defined in map.jinja
|
||||
lookup:
|
||||
|
|
Loading…
Add table
Reference in a new issue