cisco.nxos.nxos_vrf_af 模块 – 管理 VRF AF。
注意
此模块是 cisco.nxos 集合(版本 9.2.1)的一部分。
如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install cisco.nxos。
要在剧本中使用它,请指定:cisco.nxos.nxos_vrf_af。
cisco.nxos 1.0.0 中的新增功能
概要
- 管理 VRF AF 
参数
| 参数 | 注释 | 
|---|---|
| 地址族标识符 (AFI)。 选项 
 | |
| 启用/禁用导入和导出目标社区的 EVPN 路由目标“自动”设置。 选项 
 | |
| 指定应在 AF 下导入和/或导出的路由目标。此参数接受一个字典列表,指定每个路由目标、方向(导入|导出|两者)和状态。默认方向是  | |
| 指示路由目标的方向(导入|导出|两者) 选项 
 | |
| 定义路由目标本身 | |
| 确定给定方向的路由目标是否应在设备上存在。 选项 
 | |
| 确定配置是否应在设备上存在。 选项 
 | |
| 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
返回值
常见返回值已在此处记录 此处,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| 发送到设备的命令 返回:始终 示例:  | 
