Iterate through every group/host pair but won't work with 'groups'

5 views
Skip to first unread message

bur...@scalefastr.io

unread,
Dec 2, 2017, 1:30:22 PM12/2/17
to Ansible Project
I don't think Ansible will work with this scenario.

I want to iterate through every ansible role and host as a flat index.

Right now the groups variable is what I'm focused on.  Which is:

group0: 
  - host0
  - host1

group1: 
  - host2
  - host3

I want to process it as:

group0, host0
group0, host1
group1, host2
group1, host3

... but I don't think this is possible.  Is there a 'flatten' I can use?  

with_dict and with_subelements won't work.

with_subelements complains that it expects a map with a key to iterate from.
   
Reply all
Reply to author
Forward
0 new messages