Note
This module is part of ansible-base
and included in all Ansible installations. In most cases, you can use the short module name gather_facts even without specifying the collections:
keyword. Despite that, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.
New in version 2.8: of ansible.builtin
/usr/bin/ansible
to check what variables are available to a host.Note
This module has a corresponding action plugin.
Parameter | Choices/Defaults | Comments |
---|---|---|
parallel boolean |
| A toggle that controls if the fact modules are executed in parallel or serially and in order. This can guarantee the merge order of module facts at the expense of performance. By default it will be true if more than one fact module is used. |
Note
# Display facts from all hosts and store them indexed by I(hostname) at C(/tmp/facts). # ansible all -m gather_facts --tree /tmp/facts
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/gather_facts_module.html