cisco.nxos.nxos_feature module – Manage features in NX-OS switches.

Note

This module is part of the cisco.nxos collection (version 8.1.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install cisco.nxos.

To use it in a playbook, specify: cisco.nxos.nxos_feature.

New in cisco.nxos 1.0.0

Synopsis

  • Offers ability to enable and disable features in NX-OS.

Aliases: feature

Parameters

Parameter

Comments

feature

string / required

Name of feature.

state

string

Desired state of the feature.

Choices:

  • "enabled" ← (default)

  • "disabled"

Notes

Note

  • Tested against Cisco MDS NX-OS 9.2(2)

  • 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 <https://www.ansible.com/integrations/networks/cisco>`_.

Examples

- name: Ensure lacp is enabled
  cisco.nxos.nxos_feature:
    feature: lacp
    state: enabled

- name: Ensure ospf is disabled
  cisco.nxos.nxos_feature:
    feature: ospf
    state: disabled

- name: Ensure vpc is enabled
  cisco.nxos.nxos_feature:
    feature: vpc
    state: enabled

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

commands

list / elements=string

The set of commands to be sent to the remote device

Returned: always

Sample: ["nv overlay evpn"]

Authors

  • Jason Edelman (@jedelman8)

  • Gabriele Gerbino (@GGabriele)

  • Suhas Bharadwaj (@srbharadwaj)