Ansible variables: Difference between revisions
Created page with "== 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 informati..." |
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight" |
||
| (3 intermediate revisions by 2 users not shown) | |||
| 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= | |||
<syntaxhighlight lang="json"> | |||
wiki.example.net | SUCCESS => { | wiki.example.net | SUCCESS => { | ||
"ansible_facts": { | "ansible_facts": { | ||
| Line 434: | Line 440: | ||
"changed": false | "changed": false | ||
} | } | ||
</ | </syntaxhighlight> | ||
}} | |||
[[Category:Ansible]] | |||
[[Category:DevOps]] | |||