title: Iterate a list within a dictionary in ansible
body: <p>I have a variable structured like this. I have successfully used this with <code>with_dict</code> with a single key in the <code>accessible_from</code></p>
  
  <pre><code>vars:
    mysql_dbs:
      db1:
        user: db1_user
        pass: "password"
        accessible_from: localhost
      db2:
        user: db2_user
        pass: "password2"
        accessible_from: '%'
  </code></pre>
  
  <p>This is applied using the <code>mysql_db</code> ansible module, like this:</p>
  
  <pre><code>- name: Configure mysql users
    mysql_user: name={{ item.value.user }} password={{ item.value.pass }} host={{ item.value.accessible_from | default('localhost')}} priv={{ item.key }}.*:ALL state=present
    with_dict: "{{ mysql_dbs }}"
  </code></pre>
  
  <p>I would like <code>accessible_from</code> to have the ability to be a list. It doesn't matter if it <em>has</em> to be a list, but a single key/value pair is not enough :) So for example:</p>
  
  <pre><code>vars:
    mysql_dbs:
      db1:
        user: db1_user
        pass: "password"
        accessible_from:
          - server1
          - server2
          - localhost
      db2:
        user: db2_user
        pass: "password"
        accessible_from:
          - '%'
  </code></pre>
  
  <p>So - the aim is to create all the DBs and users in one play. I've tried playing around with <code>with_subelements</code>, without success. Is it actually possible to do this? Or is it necessary to restructure the data, or rewrite the play? I'll do that if I have to, but I was wondering if there was another way round it.</p>