Editing Gather facts
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
[[Ansible]] <code>gather_facts</code> [[Ansible module|module]], new in [[Ansible 2.8]] (May 2019), allows to gather useful variables about remote hosts that can be used in [[playbooks]] | [[Ansible]] <code>gather_facts</code> [[Ansible module|module]], new in [[Ansible 2.8]] (May 2019), allows to gather useful variables about remote hosts that can be used in [[playbooks]] | ||
* https://docs.ansible.com/ansible/latest/modules/gather_facts_module.html | * https://docs.ansible.com/ansible/latest/modules/gather_facts_module.html | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <code>gather_facts: [ no | yes ]</code> | |
− | |||
− | |||
Example: | Example: | ||
− | #! | + | #!/usr/bin/env ansible-playbook |
- [[hosts:]] localhost | - [[hosts:]] localhost | ||
Line 38: | Line 31: | ||
* <code>[[bolt task run facts --targets]]</code> | * <code>[[bolt task run facts --targets]]</code> | ||
* [[Chef]]: <code>[[inspec detect]]</code> | * [[Chef]]: <code>[[inspec detect]]</code> | ||
− | * <code>[[ansible.builtin.set_fact]]</code> | + | * https://docs.ansible.com/ansible/latest/user_guide/playbooks_vars_facts.html#ansible-facts |
+ | * <code>[[ansible.builtin.set_fact]]</code> | ||
== See also == | == See also == | ||
* Ansible <code>setup</code> module: https://docs.ansible.com/ansible/latest/modules/setup_module.html | * Ansible <code>setup</code> module: https://docs.ansible.com/ansible/latest/modules/setup_module.html | ||
* {{Ansible modules}} | * {{Ansible modules}} | ||
+ | * {{Ansible}} | ||
[[Category:Ansible]] | [[Category:Ansible]] | ||
+ | [[Category:Server administration]] |
Advertising: