Gets facts about NX-OS switches
Version added: 1.0.0
- Collects facts from Cisco Nexus devices running the NX-OS operating system. Fact collection is supported over both
network_cli
andhttpapi
. This module prepends all of the base network fact keys withansible_net_<fact>
. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Note
- Tested against NXOSv 7.3.(0)D1(1) on VIRL
- Unsupported for Cisco MDS
- For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_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.
- name: Gather all legacy facts
cisco.nxos.nxos_facts:
gather_subset: all
- name: Gather only the config and default facts
cisco.nxos.nxos_facts:
gather_subset:
- config
- name: Do not gather hardware facts
cisco.nxos.nxos_facts:
gather_subset:
- '!hardware'
- name: Gather legacy and resource facts
cisco.nxos.nxos_facts:
gather_subset: all
gather_network_resources: all
- name: Gather only the interfaces resource facts and no legacy facts
cisco.nxos.nxos_facts:
gather_subset:
- '!all'
- '!min'
gather_network_resources:
- interfaces
- name: Gather interfaces resource and minimal legacy facts
cisco.nxos.nxos_facts:
gather_subset: min
gather_network_resources: interfaces
Common return values are documented here, the following are the fields unique to this module:
- Jason Edelman (@jedelman8)
- Gabriele Gerbino (@GGabriele)