Coming two lists into one

17 views
Skip to first unread message

Stanley Nguyen

unread,
Aug 23, 2015, 11:53:29 AM8/23/15
to Ansible Project
I'm having a very simple requirement but I have a tough time to make it work....

Basically I have a list like this:

MACHINES:
  [ { name: "Test1", ip: "192.168.1.100"}, 
    { name: "Test2", ip: "192.168.1.101"},
  ]

I then query AWS to get a list of machines back in a registered variable.  What I want to do is to loop over this this registered variable to get InstanceID for any matching host with my MACHINES, then tag it with the Name in MACHINES.  Can anyone advise on how I can achieve this?

Thanks,

Stanley

Reply all
Reply to author
Forward
0 new messages