Merge pull request #29 from tiger-seo/master

allow to add users without password
This commit is contained in:
Nitin Madhok 2014-08-07 12:52:05 -04:00
commit 8bff5e8aea
2 changed files with 8 additions and 2 deletions

View file

@ -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') }}'

View file

@ -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: