title: Ansible nested and two lists
body: <p>I need to apply ufw rules to 2 sets of machines with a list of ports (same ports for both sets).</p>
  
  <p>What is the correct syntax to do correct the example below?</p>
  
  <pre><code>- ufw: rule=allow from_ip={{item[0]}} to_port={{item[1]}}
    with_nested:
    - "{{groups['nodesA']}},{{groups['nodesB']}}" &lt;=== BAD
    - [ '1', '2', '3']#Ports
  </code></pre>