Multiple Sub Elements Iteration

Given a variable

v1

  • head : first
    x : [ ‘a’ , ‘b’, ‘c’ ]
    y : [ ‘d’, ‘e’ ]
    z : [ ‘f’, ‘g’, ‘h’ ]

  • head: second
    x : [ ‘a2’ , ‘b2’, ‘c2’ ]
    y : [ ‘d2’, ‘e2’ ]
    z : [ ‘f2’, ‘g2’, ‘h2’ ]

I want to iterate over x,y and z in the same task for all v1 items. How can I accomplish this ?

So something like below (which does’nt work)

  • debug: msg="First {{ item[0] }}, Second {{ item[1] }}, Third {{ item[2] }}
    with_subelements:
  • “{{ v1 }}”
  • x
  • y
  • z

I tried with_nested too but that does’nt work either as with_nested would need individual lists whereas I want to iterate over subelements.

How shall I accomplish this ?

This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.

This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.

**E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.**