The Ansible Cisco NX-OS collection includes a variety of Ansible content to help automate the management of Cisco NX-OS network appliances.
The Cisco NX-OS connection plugins combined with Cisco NX-OS resource modules aligns the Cisco NX-OS experience with the other core networking platforms supported by Ansible.
This collection has been tested against Cisco NX-OS 7.0(3)I5(1) on Nexus Switches and NX-OS 8.4(1) on MDS Switches.
This collection has been tested against following Ansible versions: >=2.9.10.
Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible.
The Cisco NX-OS collection supports network_cli
and httpapi
connections.
Name | Description |
---|---|
cisco.nxos.nxos | Use NX-OS cliconf to run commands on Cisco NX-OS platform |
Name | Description |
---|---|
cisco.nxos.nxos | Use NX-API to run commands on Cisco NX-OS platform |
Name | Description |
---|---|
cisco.nxos.nxos_aaa_server | Manages AAA server global configuration. |
cisco.nxos.nxos_aaa_server_host | Manages AAA server host-specific configuration. |
cisco.nxos.nxos_acl | (deprecated, removed after 2022-06-01) Manages access list entries for ACLs. |
cisco.nxos.nxos_acl_interface | (deprecated, removed after 2022-06-01) Manages applying ACLs to interfaces. |
cisco.nxos.nxos_acl_interfaces | ACL interfaces resource module |
cisco.nxos.nxos_acls | ACLs resource module |
cisco.nxos.nxos_banner | Manage multiline banners on Cisco NXOS devices |
cisco.nxos.nxos_bfd_global | Bidirectional Forwarding Detection (BFD) global-level configuration |
cisco.nxos.nxos_bfd_interfaces | BFD interfaces resource module |
cisco.nxos.nxos_bgp | (deprecated, removed after 2023-01-27) Manages BGP configuration. |
cisco.nxos.nxos_bgp_address_family | BGP Address Family resource module. |
cisco.nxos.nxos_bgp_af | (deprecated, removed after 2023-02-24) Manages BGP Address-family configuration. |
cisco.nxos.nxos_bgp_global | BGP Global resource module. |
cisco.nxos.nxos_bgp_neighbor | (deprecated, removed after 2023-01-27) Manages BGP neighbors configurations. |
cisco.nxos.nxos_bgp_neighbor_address_family | BGP Neighbor Address Family resource module. |
cisco.nxos.nxos_bgp_neighbor_af | (deprecated, removed after 2023-02-24) Manages BGP address-family's neighbors configuration. |
cisco.nxos.nxos_command | Run arbitrary command on Cisco NXOS devices |
cisco.nxos.nxos_config | Manage Cisco NXOS configuration sections |
cisco.nxos.nxos_devicealias | Configuration of device alias for Cisco NXOS MDS Switches. |
cisco.nxos.nxos_evpn_global | Handles the EVPN control plane for VXLAN. |
cisco.nxos.nxos_evpn_vni | Manages Cisco EVPN VXLAN Network Identifier (VNI). |
cisco.nxos.nxos_facts | Gets facts about NX-OS switches |
cisco.nxos.nxos_feature | Manage features in NX-OS switches. |
cisco.nxos.nxos_file_copy | Copy a file to a remote NXOS device. |
cisco.nxos.nxos_gir | Trigger a graceful removal or insertion (GIR) of the switch. |
cisco.nxos.nxos_gir_profile_management | Create a maintenance-mode or normal-mode profile for GIR. |
cisco.nxos.nxos_hsrp | Manages HSRP configuration on NX-OS switches. |
cisco.nxos.nxos_hsrp_interfaces | HSRP interfaces resource module |
cisco.nxos.nxos_igmp | Manages IGMP global configuration. |
cisco.nxos.nxos_igmp_interface | Manages IGMP interface configuration. |
cisco.nxos.nxos_igmp_snooping | Manages IGMP snooping global configuration. |
cisco.nxos.nxos_install_os | Set boot options like boot, kickstart image and issu. |
cisco.nxos.nxos_interface | (deprecated, removed after 2022-06-01) Manages physical attributes of interfaces. |
cisco.nxos.nxos_interface_ospf | (deprecated, removed after 2022-10-26) Manages configuration of an OSPF interface instance. |
cisco.nxos.nxos_interfaces | Interfaces resource module |
cisco.nxos.nxos_l2_interface | (deprecated, removed after 2022-06-01) Manage Layer-2 interface on Cisco NXOS devices. |
cisco.nxos.nxos_l2_interfaces | L2 interfaces resource module |
cisco.nxos.nxos_l3_interface | (deprecated, removed after 2022-06-01) Manage L3 interfaces on Cisco NXOS network devices |
cisco.nxos.nxos_l3_interfaces | L3 interfaces resource module |
cisco.nxos.nxos_lacp | LACP resource module |
cisco.nxos.nxos_lacp_interfaces | LACP interfaces resource module |
cisco.nxos.nxos_lag_interfaces | LAG interfaces resource module |
cisco.nxos.nxos_linkagg | (deprecated, removed after 2022-06-01) Manage link aggregation groups on Cisco NXOS devices. |
cisco.nxos.nxos_lldp | (deprecated, removed after 2022-06-01) Manage LLDP configuration on Cisco NXOS network devices. |
cisco.nxos.nxos_lldp_global | LLDP resource module |
cisco.nxos.nxos_lldp_interfaces | LLDP interfaces resource module |
cisco.nxos.nxos_logging | Manage logging on network devices |
cisco.nxos.nxos_ntp | Manages core NTP configuration. |
cisco.nxos.nxos_ntp_auth | Manages NTP authentication. |
cisco.nxos.nxos_ntp_options | Manages NTP options. |
cisco.nxos.nxos_nxapi | Manage NXAPI configuration on an NXOS device. |
cisco.nxos.nxos_ospf | (deprecated, removed after 2022-06-01) Manages configuration of an ospf instance. |
cisco.nxos.nxos_ospf_interfaces | OSPF Interfaces Resource Module. |
cisco.nxos.nxos_ospf_vrf | (deprecated, removed after 2022-10-01)Manages a VRF for an OSPF router. |
cisco.nxos.nxos_ospfv2 | OSPFv2 resource module |
cisco.nxos.nxos_ospfv3 | OSPFv3 resource module |
cisco.nxos.nxos_overlay_global | Configures anycast gateway MAC of the switch. |
cisco.nxos.nxos_pim | Manages configuration of a PIM instance. |
cisco.nxos.nxos_pim_interface | Manages PIM interface configuration. |
cisco.nxos.nxos_pim_rp_address | Manages configuration of an PIM static RP address instance. |
cisco.nxos.nxos_ping | Tests reachability using ping from Nexus switch. |
cisco.nxos.nxos_reboot | Reboot a network device. |
cisco.nxos.nxos_rollback | Set a checkpoint or rollback to a checkpoint. |
cisco.nxos.nxos_rpm | Install patch or feature rpms on Cisco NX-OS devices. |
cisco.nxos.nxos_smu | (deprecated, removed after 2022-10-01) Perform SMUs on Cisco NX-OS devices. |
cisco.nxos.nxos_snapshot | Manage snapshots of the running states of selected features. |
cisco.nxos.nxos_snmp_community | Manages SNMP community configs. |
cisco.nxos.nxos_snmp_contact | Manages SNMP contact info. |
cisco.nxos.nxos_snmp_host | Manages SNMP host configuration. |
cisco.nxos.nxos_snmp_location | Manages SNMP location information. |
cisco.nxos.nxos_snmp_traps | Manages SNMP traps. |
cisco.nxos.nxos_snmp_user | Manages SNMP users for monitoring. |
cisco.nxos.nxos_static_route | (deprecated, removed after 2022-06-01) Manages static route configuration |
cisco.nxos.nxos_static_routes | Static routes resource module |
cisco.nxos.nxos_system | Manage the system attributes on Cisco NXOS devices |
cisco.nxos.nxos_telemetry | TELEMETRY resource module |
cisco.nxos.nxos_udld | Manages UDLD global configuration params. |
cisco.nxos.nxos_udld_interface | Manages UDLD interface configuration params. |
cisco.nxos.nxos_user | Manage the collection of local users on Nexus devices |
cisco.nxos.nxos_vlan | (deprecated, removed after 2022-06-01) Manages VLAN resources and attributes. |
cisco.nxos.nxos_vlans | VLANs resource module |
cisco.nxos.nxos_vpc | Manages global VPC configuration |
cisco.nxos.nxos_vpc_interface | Manages interface VPC configuration |
cisco.nxos.nxos_vrf | Manages global VRF configuration. |
cisco.nxos.nxos_vrf_af | Manages VRF AF. |
cisco.nxos.nxos_vrf_interface | Manages interface specific VRF configuration. |
cisco.nxos.nxos_vrrp | Manages VRRP configuration on NX-OS switches. |
cisco.nxos.nxos_vsan | Configuration of vsan for Cisco NXOS MDS Switches. |
cisco.nxos.nxos_vtp_domain | Manages VTP domain configuration. |
cisco.nxos.nxos_vtp_password | Manages VTP password configuration. |
cisco.nxos.nxos_vtp_version | Manages VTP version configuration. |
cisco.nxos.nxos_vxlan_vtep | Manages VXLAN Network Virtualization Endpoint (NVE). |
cisco.nxos.nxos_vxlan_vtep_vni | Creates a Virtual Network Identifier member (VNI) |
cisco.nxos.nxos_zone_zoneset | Configuration of zone/zoneset for Cisco NXOS MDS Switches. |
Click the Content
button to see the list of content included in this collection.
You can install the Cisco NX-OS collection with the Ansible Galaxy CLI:
ansible-galaxy collection install cisco.nxos
You can also include it in a requirements.yml
file and install it with ansible-galaxy collection install -r requirements.yml
, using the format:
---
collections:
- name: cisco.nxos
This collection includes network resource modules.
You can call modules by their Fully Qualified Collection Namespace (FQCN), such as cisco.nxos.nxos_l2_interfaces
.
The following example task replaces configuration changes in the existing configuration on a Cisco NX-OS network device, using the FQCN:
---
- name: Replace device configuration of specified L2 interfaces with provided configuration.
cisco.nxos.nxos_l2_interfaces:
config:
- name: Ethernet1/1
trunk:
native_vlan: 20
trunk_vlans: 5-10, 15
state: replaced
NOTE: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated.
- Cisco NX-OS Platform Options
- Ansible Using collections for more details.
Ongoing development efforts and contributions to this collection are solely focused on enhancements to current resource modules, additional resource modules and enhancements to connection plugins.
We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the Cisco NX-OS collection repository. See Contributing to Ansible-maintained collections for complete details.
You can also join us on:
- Freenode IRC -
#ansible-network
Freenode channel - Slack - https://ansiblenetwork.slack.com
See the Ansible Community Guide for details on contributing to Ansible.
This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.
Release notes are available here.
- Ansible network resources
- Ansible Collection overview
- Ansible User guide
- Ansible Developer guide
- Ansible Community code of conduct
GNU General Public License v3.0 or later.
See LICENSE to see the full text.