cisco.nxos.nxos_vrf_af 模块 – 管理 VRF 地址族。
注意
此模块是 cisco.nxos 集合 (版本 9.2.1) 的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install cisco.nxos
。
要在 playbook 中使用它,请指定:cisco.nxos.nxos_vrf_af
。
cisco.nxos 1.0.0 中的新增功能
概要
管理 VRF 地址族
参数
参数 |
注释 |
---|---|
地址族标识符 (AFI)。 选项
|
|
启用/禁用 EVPN 路由目标“自动”设置,用于导入和导出目标社区。 选项
|
|
指定应在 AF 下导入和/或导出的路由目标。此参数接受一个字典列表,用于指定每个路由目标的路由目标、方向 (import|export|both) 和状态。默认方向为 |
|
指示路由目标的方向 (import|export|both) 选项
|
|
定义路由目标本身 |
|
确定具有给定方向的路由目标是否应存在于设备上。 选项
|
|
确定配置是否应存在于设备上。 选项
|
|
VRF 的名称。 |
备注
注意
在 VIRL 上针对 NXOSv 7.3.(0)D1(1) 测试。
不支持 Cisco MDS。
默认情况下(如果支持),将恢复参数的默认值。
如果
state=absent
,则地址族配置将不存在。因此,选项route_target_both_auto_evpn
和route_targets
将被忽略。有关使用 CLI 和 NX-API 的信息,请参阅:ref:`NXOS 平台选项指南 <nxos_platform_options>`
有关使用 Ansible 管理网络设备的更多信息,请参阅:ref:`Ansible 网络指南 <network_guide>`
有关使用 Ansible 管理 Cisco 设备的更多信息,请参阅 `Cisco 集成页面 <https://ansible.org.cn/integrations/networks/cisco>`_。
示例
- cisco.nxos.nxos_vrf_af:
vrf: ntc
afi: ipv4
route_target_both_auto_evpn: true
state: present
- cisco.nxos.nxos_vrf_af:
vrf: ntc
afi: ipv4
route_targets:
- rt: '65000:1000'
direction: import
- rt: '65001:1000'
direction: import
- cisco.nxos.nxos_vrf_af:
vrf: ntc
afi: ipv4
route_targets:
- rt: '65000:1000'
direction: import
- rt: '65001:1000'
state: absent
- cisco.nxos.nxos_vrf_af:
vrf: ntc
afi: ipv4
route_targets:
- rt: '65000:1000'
direction: export
- rt: '65001:1000'
direction: export
- cisco.nxos.nxos_vrf_af:
vrf: ntc
afi: ipv4
route_targets:
- rt: '65000:1000'
direction: export
state: absent
- cisco.nxos.nxos_vrf_af:
vrf: ntc
afi: ipv4
route_targets:
- rt: '65000:1000'
direction: both
state: present
- rt: '65001:1000'
direction: import
state: present
- rt: '65002:1000'
direction: both
state: absent
返回值
常见的返回值已记录在 此处,以下是此模块特有的字段
键 |
描述 |
---|---|
发送到设备的命令 返回:始终 示例: |