Hi guys , I am having a really hard time with registered variables. I banged my head around all day… but could not figure this out.
I simply want to register my task result as a variable and access it later on.
This is my debug: var= result: https://pastebin.mozilla.org/8950629
and I simply want to get dns_name
I call it like this:
- name: Wait for servers to boot up
wait_for:
host: “{{ item.dns_name }}”
port: 22
delay: 30
timeout: 300
state: started
with_items: ec2_result.instances
But I am getting error saying that
fatal: [localhost]: FAILED! => {“failed”: true, “msg”: "the field ‘args’ has an invalid value, which appears to include a variable that is undefined. The error was: ‘unicode object’ has no attribute ‘dns_name’\n\n
Can you guys please point me to right direction?
Thank you.