arrays/loops/dict mixed. Confused. Did research

15 views
Skip to first unread message

AnsiNoob

unread,
Sep 3, 2016, 1:27:55 PM9/3/16
to Ansible Project
Hi

I have means to generate a variables file which will look like:

---
pools:
  name1:
    x: ['1','1','1','1','2','2','2','2','3','3','3']
    y: ['0','0','0','0','0','0','0','0','0','0','0']
    z: ['1','2','3','4','1','2','3','4','1','2','3']
  name2:
    x: ['1','1','1','1','2','2','2','2','3']
    y: ['0','0','0','0','0','0','0','0','0']
    z: ['1','2','3','4','1','2','3','4','1']

but I'm not able to surf thru this using with_together or with_dict. Totally confused how to do this.

I basically need to sift in below fashion:

[1,0,1]
[1,0,2]
[1,0,3]
[1,0,4]
[1,0,1]
[1,0,2]
[1,0,3]
[1,0,4]
[1,0,1]
[1,0,2]
[1,0,3]

when: item.key == name1
Reply all
Reply to author
Forward
0 new messages