Module to collect facts from remote devices.
Version added: 1.0.0
- Collects facts from network devices running the iosxr operating system. This module places the facts gathered in the fact tree keyed by the respective resource name. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Note
- This module works with connection
network_cli
. See the IOS-XR Platform Options. - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
- For more information on using Ansible to manage Cisco devices see the Cisco integration page.
# Gather all facts
- cisco.iosxr.iosxr_facts:
gather_subset: all
gather_network_resources: all
# Collect only the config and default facts
- cisco.iosxr.iosxr_facts:
gather_subset:
- config
# Do not collect hardware facts
- cisco.iosxr.iosxr_facts:
gather_subset:
- '!hardware'
# Collect only the lacp facts
- cisco.iosxr.iosxr_facts:
gather_subset:
- '!all'
- '!min'
gather_network_resources:
- lacp
# Do not collect lacp_interfaces facts
- cisco.iosxr.iosxr_facts:
gather_network_resources:
- '!lacp_interfaces'
# Collect lacp and minimal default facts
- cisco.iosxr.iosxr_facts:
gather_subset: min
gather_network_resources: lacp
# Collect only the interfaces facts
- cisco.iosxr.iosxr_facts:
gather_subset:
- '!all'
- '!min'
gather_network_resources:
- interfaces
- l2_interfaces
Common return values are documented here, the following are the fields unique to this module:
- Ricardo Carrillo Cruz (@rcarrillocruz)
- Nilashish Chakraborty (@Nilashishc)