# Indempotency goal hard to reach, can this be done with dict, lists, nested lists?

**URL:** <https://forum.ansible.com/t/indempotency-goal-hard-to-reach-can-this-be-done-with-dict-lists-nested-lists/14913>\
**Category:** Ansible Project\
**Created:** [April 2, 2014, 7:56am UTC](https://forum.ansible.com/t/indempotency-goal-hard-to-reach-can-this-be-done-with-dict-lists-nested-lists/14913 "2014-04-02T07:56:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marko\_Lisica](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Marko\_Lisica](https://forum.ansible.com/u/Marko_Lisica)\
**Post date:** [April 2, 2014, 7:56am UTC](https://forum.ansible.com/t/indempotency-goal-hard-to-reach-can-this-be-done-with-dict-lists-nested-lists/14913/1 "2014-04-02T07:56:36Z")

</div>

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.
