Ansible ec2_facts outputs null

92 views
Skip to first unread message

Rahul Mehrotra

unread,
Apr 21, 2015, 2:52:29 PM4/21/15
to ansible...@googlegroups.com

Hi,

I am currently working on using Ansible for implementing rolling upgrade feature.

I was trying to gather ec2_facts using dynamic inventory however it outputs null and is not able to gather any information

command used:

 ansible localhost  -i ec2.py -m ec2_facts 

OUTPUT

localhost | success >> {
"ansible_facts": {
    "ansible_ec2_public-key": null,
    "ansible_ec2_public_key": null,
    "ansible_ec2_user-data": null,
    "ansible_ec2_user_data": null
},
"changed": false
}

If I am trying it using

 ansible all  -i ec2.py -m ec2_facts 

I recieve the following OUTPUT

No hosts matched

Can anyone point out what I am missing here ? Thanks


I am able to get host information if I am doing 

./ec2.py --list

Brian Coca

unread,
Apr 30, 2015, 10:48:22 AM4/30/15
to ansible...@googlegroups.com
can you show the output of:

ansible all -i ec2.py -m ec2_facts --list-hosts


--
Brian Coca
Reply all
Reply to author
Forward
0 new messages