cisco.nxos.nxos_feature 模块 – 管理 NX-OS 交换机中的特性。

注意

此模块是 cisco.nxos 集合(版本 9.2.1)的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用: ansible-galaxy collection install cisco.nxos

要在 playbook 中使用它,请指定: cisco.nxos.nxos_feature

cisco.nxos 1.0.0 中的新增功能

概要

  • 提供在 NX-OS 中启用和禁用特性的能力。

参数

参数

注释

feature

字符串 / 必需

特性的名称。

state

字符串

特性的期望状态。

选项

  • "enabled" ← (默认)

  • "disabled"

说明

注意

  • 已针对 Cisco MDS NX-OS 9.2(2) 进行测试

  • 有关使用 CLI 和 NX-API 的信息,请参阅 :ref:`NXOS 平台选项指南 <nxos_platform_options>`

  • 有关使用 Ansible 管理网络设备的更多信息,请参阅 :ref:`Ansible 网络指南 <network_guide>`

  • 有关使用 Ansible 管理 Cisco 设备的更多信息,请参阅 `Cisco 集成页面 <https://ansible.org.cn/integrations/networks/cisco>`_。

示例

- 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

返回值

常见返回值在此处记录 这里,以下是此模块特有的字段

描述

commands

列表 / 元素=字符串

要发送到远程设备的命令集

返回: 总是

示例: ["nv overlay evpn"]

作者

  • Jason Edelman (@jedelman8)

  • Gabriele Gerbino (@GGabriele)

  • Suhas Bharadwaj (@srbharadwaj)