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?
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.
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.