allow to add users without password

This commit is contained in:
tiger-seo 2014-08-07 19:24:59 +03:00
parent b74acd30ab
commit a3784bd124
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: