Commit 591abf7d by Feanil Patel

Update the iteration to not uses dicts.

parent 6805248a
...@@ -57,25 +57,25 @@ ...@@ -57,25 +57,25 @@
- name: create mysql databases - name: create mysql databases
mysql_db: > mysql_db: >
db={{ item.key }} db={{ item.name}}
state={{ item.value.state }} state={{ item.state }}
encoding={{ item.value.encoding }} encoding={{ item.encoding }}
login_host={{ item.value.login_host }} login_host={{ item.login_host }}
login_user={{ item.value.login_user }} login_user={{ item.login_user }}
login_password={{ item.value.login_password }} login_password={{ item.login_password }}
with_items: databases with_items: databases
tags: tags:
- dbs - dbs
- name: create mysql users and assign privileges - name: create mysql users and assign privileges
mysql_user: > mysql_user: >
name="{{ item.key }}" name="{{ item.name }}"
priv="{{ '/'.join(item.value.privileges) }}" priv="{{ '/'.join(item.privileges) }}"
password="{{ item.value.password }}" password="{{ item.password }}"
host={{ item.value.host }} host={{ item.host }}
login_host={{ item.value.login_host }} login_host={{ item.login_host }}
login_user={{ item.value.login_user }} login_user={{ item.login_user }}
login_password={{ item.value.login_password }} login_password={{ item.login_password }}
append_privs=yes append_privs=yes
with_items: database_users with_items: database_users
tags: tags:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment