Hi,
I am testing to print ec2 instance public dns names by ansible.
- hosts: localhost
connection: local
tasks:
- name: get instance public dns name
ec2_remote_facts:
region: ap-southeast-2
filters:
instance-state-name: running
register: ec2
- debug: var=ec2.instances.public_dns_name
but i got " "ec2.instances.public_dns_name": "VARIABLE IS NOT DEFINED!" .
where i m doing mistake?
Thanks
Benjo
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/fd26b6d1-2da2-4193-9ba1-63e2f5aab373%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.