Skip to content
Snippets Groups Projects
Commit a3784bd1 authored by tiger-seo's avatar tiger-seo
Browse files

allow to add users without password

parent b74acd30
Branches
No related tags found
No related merge requests found
...@@ -13,9 +13,11 @@ include: ...@@ -13,9 +13,11 @@ include:
- host: '{{ user['host'] }}' - host: '{{ user['host'] }}'
{%- if user['password_hash'] is defined %} {%- if user['password_hash'] is defined %}
- password_hash: '{{ user['password_hash'] }}' - password_hash: '{{ user['password_hash'] }}'
{% else %} {%- elif user['password'] is defined and user['password'] != None %}
- password: '{{ user['password'] }}' - password: '{{ user['password'] }}'
{% endif %} {%- else %}
- allow_passwordless: True
{%- endif %}
- connection_host: localhost - connection_host: localhost
- connection_user: root - connection_user: root
- connection_pass: '{{ salt['pillar.get']('mysql:server:root_password', 'somepass') }}' - connection_pass: '{{ salt['pillar.get']('mysql:server:root_password', 'somepass') }}'
......
...@@ -34,6 +34,10 @@ mysql: ...@@ -34,6 +34,10 @@ mysql:
grants: ['all privileges'] grants: ['all privileges']
- database: bar - database: bar
grants: ['select', 'insert', 'update', 'delete'] grants: ['select', 'insert', 'update', 'delete']
- name: nopassuser
password: ~
host: localhost
databases: []
# Override any names defined in map.jinja # Override any names defined in map.jinja
lookup: lookup:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment