Ansible Setup module

This module is automatically called by the playbooks to gather useful variables about remote hosts that can be subsequently used in playbooks.

We can call this module directly with the ansible command to see the variables available for a target.

The information provided by this command are referred to as facts and correspondingly Ansible provides many facts about the system automatically.

In Ansible 2.10, this has been moved to ansible-base ans is classed as 'builtin' plugin. It can be referenced via the name 'setup' or 'ansible.builtin.setup':

ansible -i inv localhost -m setup
ansible -i inv localhost -m ansible.builtin.setup