title: Ansible looping over sub-lists
body: <p>I have a yaml for the creation of a user.</p>
  
  <pre><code> users:  
     username:  
      uid: 12345  
      gid: 6789  
      secggroups:  
           - group1  
           - group3  
      gecos: user_for_xyz  
      home: /home/username  
  </code></pre>
  
  <p>I also have a file with just the <code>usernames</code> called <code>users_list</code>. The playbook to create users is as follows:</p>
  
  <pre><code>---  
  \- name: create users
    user: name="{{ item }}" uid={{ users[item]['uid'] }} group={{ users[item][gid] }} comment="{{ users[item]['gecos'] }}" home={{ users[item]['home' }} expires=0  
    with_items:  
      \- users_list  
  </code></pre>
  
  <p>How can I loop through the groups to be added to user?</p>