Ansible variables: Difference between revisions
m added Category:DevOps using HotCat |
put details in collapsed section; link to variable precedence |
||
| Line 1: | Line 1: | ||
Variable Scope and Precedence rules: https://docs.ansible.com/ansible/latest/reference_appendices/general_precedence.html | |||
== Facts == | == Facts == | ||
Assuming a hostname of '''wiki.example.net''' is defined in your 'hosts' inventory; using <code>ansible wiki.example.net -m setup</code> you get a lot of information about the host (see https://docs.ansible.com/ansible/playbooks_variables.html#information-discovered-from-systems-facts). | Assuming a hostname of '''wiki.example.net''' is defined in your 'hosts' inventory; using <code>ansible wiki.example.net -m setup</code> you get a lot of information about the host (see https://docs.ansible.com/ansible/playbooks_variables.html#information-discovered-from-systems-facts). | ||
{{Collapsible | |||
|visible_text=<code>ansible wiki.example.net -m setup</code> | |||
|collapsed_content= | |||
<source lang="json"> | <source lang="json"> | ||
| Line 435: | Line 441: | ||
} | } | ||
</source> | </source> | ||
}} | |||
[[Category:Ansible]] | [[Category:Ansible]] | ||
[[Category:DevOps]] | [[Category:DevOps]] | ||