Folks, consider the following playbook:

##
- name: Gather facts
  action: ec2_facts

- debug: msg="{{ ec2_facts }}"
##

Produces a fatal error: `fatal: [10.1.15.119] => One or more undefined 
variables: 'ec2_facts' is undefined`

However, It does seem to be pulling in the ec2 metadata:

ok: [10.1.15.119] => {"ansible_facts": {"ansible_ec2_ami_id": "ami-f0091d...


How does one access this metadata instance a playbook?  I guess I need help 
with correct syntax.

Is this correct?  {{ ansible_facts.ansible_ec2_ami_id }} ?

Thanks!

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c78a0570-a7de-4bbb-995a-1f6b48aafd52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to