# What facts does ec2\_facts actually provide?

**URL:** <https://forum.ansible.com/t/what-facts-does-ec2-facts-actually-provide/13759>\
**Category:** Ansible Project\
**Created:** [October 24, 2013, 3:59am UTC](https://forum.ansible.com/t/what-facts-does-ec2-facts-actually-provide/13759 "2013-10-24T03:59:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Casey](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@Mark\_Casey](https://forum.ansible.com/u/Mark_Casey)\
**Post date:** [October 24, 2013, 3:59am UTC](https://forum.ansible.com/t/what-facts-does-ec2-facts-actually-provide/13759/1 "2013-10-24T03:59:03Z")

</div>

I’ve been looking around for a while now but unlike ec2.py which lists a lot of what information it returns at the top of the file, I have no idea where to find a list of what facts ec2\_facts actually provides.

Looking at the source, not even the example of ansible\_ec2\_instance\_type appears anywhere else in the source, so I don’t think looking there will illuminate what is available. I’m assuming its pulling them all in and just bulk-renaming them?

Any insights appreciated!

Thank you,  
Mark

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [October 24, 2013, 4:10am UTC](https://forum.ansible.com/t/what-facts-does-ec2-facts-actually-provide/13759/2 "2013-10-24T04:10:45Z")

</div>

You just need to run ansible-what-the-facts-say

ansible what-the-facts-say ec2 --help

Ring-ding-ding-ding-dingeringeding!  
Gering-ding-ding-ding-dingeringeding!  
Gering-ding-ding-ding-dingeringeding!

Ok, that’s totally not a thing and I apologize for meme insertion on the list 🙂

Yeah, it’s not clear from the module source, I agree! One thing we want to do for all modules is show a basic example of what they all return – that’s pending.

The super easy way to do this is call the module

ansible hostname -m ec2\_facts

(or “setup” for the stock setup module)

Yes, they are all provided by the metadata server and then given the “ansible\_” prefix.

You can also just run the playbook with -v and see all the output.

The ec2 dynamic inventory plugin also provides some useful variables.

You can watch this by

./ec2.py --list

./ec2.py --host hostname

---

<div class="post-metadata">

**Author:** ![Mark\_Casey](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@Mark\_Casey](https://forum.ansible.com/u/Mark_Casey)\
**Post date:** [October 24, 2013, 4:17am UTC](https://forum.ansible.com/t/what-facts-does-ec2-facts-actually-provide/13759/3 "2013-10-24T04:17:52Z")

</div>

No worries, I genuinely lol’ed.

Of course I found this right after I posted: [http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html#instancedata-data-categories](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html#instancedata-data-categories)

However I definitely prefer the native options you listed. Thanks for the tips!

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [October 24, 2013, 4:43am UTC](https://forum.ansible.com/t/what-facts-does-ec2-facts-actually-provide/13759/4 "2013-10-24T04:43:36Z")

</div>

I should point out our existing EC2 guide in the docs needs a _ton_ of work.

It’s on our list (likely something in the coming month or so), but I’d also welcome those interested in contributing to the rst files in the source tree that comprise it too.

---

<div class="post-metadata">

**Author:** ![knope](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@knope](https://forum.ansible.com/u/knope)\
**Post date:** [June 29, 2017, 8:14pm UTC](https://forum.ansible.com/t/what-facts-does-ec2-facts-actually-provide/13759/5 "2017-06-29T20:14:34Z")

</div>

this may be helpful [https://github.com/lorin/ansible-quickref/blob/master/ec2.rst#ec2-instance-dicts](https://github.com/lorin/ansible-quickref/blob/master/ec2.rst#ec2-instance-dicts)
