## DISCOVERED FACTS

Ansible Terminal

    # Small filtered subset of discovered facts
     ansible myserver.mine -m setup -a "filter=ansible_default_ipv4"

    myserver.mine | success >> {
      "ansible_facts": {
          "ansible_default_ipv4": {
              "address": "10.41.17.37",
              "alias": "eth0",
              "gateway": "10.41.17.1",
              "interface": "eth0",
              "macaddress": "00:69:08:3b:a9:16",
              "mtu": 1500,
              "netmask": "255.255.255.0",
              "network": "10.41.17.0",
              "type": "ether"
          },

The second ad-hoc command example from the prior slide provides the following JSON output of a localhost facts run.

Facts are bits of information derived from examining a host systems that are stored as variables for later use. An example of this might be the IP address of the host, or what operating system it is running. The facts Ansible will discover about a host is extensive. What's shown here is just a small sample. Run `ansible localhost -m setup` for a more complete representation.

Ansible collects facts using the `setup` module. By default, Ansible will run the `setup` module before any other tasks are executed in a playbook. These facts can be referenced by subsequent automation tasks on a per host-basis during the playbook run.