cisco.nxos.nxos_gir_profile_management 模块 – 为 GIR 创建维护模式或正常模式配置文件。

注意

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

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

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

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

cisco.nxos 1.0.0 中的新功能

概要

  • 管理维护模式或正常模式配置文件,其中包含可在平稳移除或平稳插入期间应用的配置命令。

参数

参数

注释

commands

list / elements=string

要包含在配置文件中的命令列表。

mode

string / required

将配置文件配置为维护模式或正常模式。

选择

  • "maintenance"

  • "normal"

state

string

指定资源的期望状态。

选择

  • "present" ← (默认)

  • "absent"

说明

注意

  • 在 VIRL 上针对 NXOSv 7.3.(0)D1(1) 进行了测试

  • 不支持 Cisco MDS

  • state=absent 删除整个配置文件。

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

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

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

示例

# Create a maintenance-mode profile
- cisco.nxos.nxos_gir_profile_management:
    mode: maintenance
    commands:
      - router eigrp 11
      - isolate

# Remove the maintenance-mode profile
- cisco.nxos.nxos_gir_profile_management:
    mode: maintenance
    state: absent

返回值

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

描述

changed

boolean

检查设备是否进行了更改

返回值: 始终

示例: true

end_state

list / elements=string

模块执行后配置文件条目的列表。

返回值: 详细模式

示例: ["router bgp 65535", "isolate", "router eigrp 10", "isolate", "diagnostic bootup level complete", "router eigrp 11", "isolate"]

existing

list / elements=string

现有配置文件命令的列表。

返回值: 详细模式

示例: ["router bgp 65535", "isolate", "router eigrp 10", "isolate", "diagnostic bootup level complete"]

proposed

list / elements=string

传递到模块中的命令列表。

返回值: 详细模式

示例: ["router eigrp 11", "isolate"]

updates

list / elements=string

发送到设备的命令

返回值: 始终

示例: ["configure maintenance profile maintenance-mode", "router eigrp 11", "isolate"]

作者

  • Gabriele Gerbino (@GGabriele)