trying to nest loop with a hash

Hello,

Want I’d like to do is something like that :

`

  • name: firewalling allow from loadbalancer
    ufw: rule=allow from_ip={{item[1]}} proto=tcp to_port={{item[0].value.porthttp}}
    with_nested:
  • my_apps_dict
  • trusted_networks
    tags:
  • ufw

`

with my_apps_dict looking like :

`
my_apps_dict:
app1:
porthttp: xxx

app2:
porthttp: xxx


`

and trusted network being a simple list.

I’ve being searching but to no avail, any ideas ?

Thanks

​Maybe


  with_nested:
    - my_apps_dict.items()
    - trusted_networks

?

You may need to write a custom iterator lookup plugin for something like that. Not sure what I’d call it.