ansible.windows.setup module – Gathers facts about remote hosts
This module is part of the ansible.windows collection (version 2.2.0).
You might already have this collection installed if you are using the
It is not included in
To check whether it is installed, run
ansible-galaxy collection list.
To install it, use:
ansible-galaxy collection install ansible.windows.
To use it in a playbook, specify:
This module is automatically called by playbooks to gather useful variables about remote hosts that can be used in playbooks. It can also be executed directly by
/usr/bin/ansibleto check what variables are available to a host. Ansible provides many facts about the system, automatically.
For internal use
Path used for local ansible facts (
The returned fact will be named after the local file (without the extension suffix), e.g.
If supplied, restrict the additional facts collected to the given subset.
Can specify a list of values to specify a larger subset.
Values can also be used with an initial
To avoid collecting even the min subset, specify
To collect only specific facts, use
Set the default timeout in seconds for individual fact gathering.
More ansible facts will be added with successive releases. If facter is installed, variables from these programs will also be snapshotted into the JSON file for usage in templating. These variables are prefixed with
facter_so it’s easy to tell their source. All variables are bubbled up to the caller.
Some facts may be unavailable if running under a limited account.
For more information about delegated facts, please check https://docs.ansible.com/ansible/latest/user_guide/playbooks_delegation.html#delegating-facts.
Gathers facts about remote hosts.
- name: run the setup facts