I see that Ansible provide some pre-defined variables that we can use in playbooks and template files. For example, the host ip address is ansible_eth0.ipv4.address. Googleing and searching the docs I cound't find a list of all available variables. Would someone list them for me?
Get a list of Ansible pre-defined variables
ansibleansible-facts
Best Answer
Argh! From the FAQ:
How do I see a list of all of the ansible_ variables? Ansible by default gathers “facts” about the machines under management, and these facts can be accessed in Playbooks and in templates. To see a list of all of the facts that are available about a machine, you can run the “setup” module as an ad-hoc action:
This will print out a dictionary of all of the facts that are available for that particular host.
Here is the output for my vagrant virtual machine called scdev:
The current documentation now has a complete chapter listing all Variables and Facts