Hi I came into a problem while I was trying  to make this role work.

- name: add db
>   mysql_db: name={{ item.user }} state=present
>   with_items: users
>

- name: add user
>   mysql_user: name={{ item.user }} host=localhost password={{ mysql_pass }}
>       state=present priv={{ item.db }}.*:ALL
>   with_items: users
>

How can I create variable list so I can have multiple databases for single 
user and setup db permissions on coresponding databases for specific user?

eg.

---
> users:
>   - user: user1
>     db:
>       - db1
>       - db11
>   - user: user2
>     db:
>       - db2
>   - user: user3
>     db:
>       - db3
>       - db33
>       - db333
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9aab9ed2-8f3f-42d2-8286-8363691a8b07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to