community.network.ce_evpn_bd_vni 模块 – 管理华为 CloudEngine 交换机上的 EVPN VXLAN 网络标识符 (VNI)。
注意
此模块是 community.network 集合(版本 5.1.0)的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install community.network
。
要在 playbook 中使用它,请指定:community.network.ce_evpn_bd_vni
。
注意
community.network 集合已被弃用,并将从 Ansible 12 中删除。有关更多信息,请参阅讨论线程。
已弃用
- 在:中删除
版本 6.0.0
- 原因:
此集合及其中的所有内容均未维护且已弃用。
- 替代:
未知。
概要
管理华为 CloudEngine 交换机上的以太网虚拟专用网络 (EVPN) VXLAN 网络标识符 (VNI) 配置。
别名:network.cloudengine.ce_evpn_bd_vni
参数
参数 |
注释 |
---|---|
指定一个已存在的桥接域 (BD)。该值是 1 到 16777215 之间的整数。 |
|
在 BD 视图中为 VXLAN 创建或删除 EVPN 实例。 选择
|
|
为 BD EVPN 实例配置路由区分符 (RD)。RD 的格式可以如下所示
|
|
管理资源的状态。 选择
|
|
将 VPN 目标添加到 BD EVPN 实例的导入和导出 VPN 目标列表。格式与 route_distinguisher 相同。 |
|
将 VPN 目标添加到 BD EVPN 实例的导出 VPN 目标列表。格式与 route_distinguisher 相同。 |
|
将 VPN 目标添加到 BD EVPN 实例的导入 VPN 目标列表。格式与 route_distinguisher 相同。 |
注意
注意
当状态为 present 时,确保已配置 EVPN 作为 VXLAN 控制平面。
当状态为 present 时,确保已存在桥接域 (BD)。
当状态为 present 时,确保已创建 VNI 并将其与广播域 (BD) 相关联。
如果配置 evpn:false 以删除 EVPN 实例,则会删除 EVPN 实例中的所有配置。
在 BD 视图中创建 EVPN 实例后,可以使用 BD-EVPN 实例视图中的 route_distinguisher 参数配置 RD。
在为 BD EVPN 实例配置 VPN 目标之前,请确保已为 BD EVPN 实例配置 RD
如果取消配置 route_distinguisher,则会同时删除 BD EVPN 实例的所有 VPN 目标属性。
当使用 state:absent 时,不支持 evpn,它将被忽略。
当使用 state:absent 删除 VPN 目标属性时,请确保已存在 VPN 目标属性的配置,否则会报告错误。
此模块需要在被管理的远程设备上启用 netconf 系统服务。
建议的连接是
netconf
。此模块也适用于遗留 playbook 的
local
连接。
示例
- name: EVPN BD VNI test
hosts: cloudengine
connection: local
gather_facts: false
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Configure an EVPN instance for a VXLAN in BD view"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
evpn: enable
provider: "{{ cli }}"
- name: "Configure a route distinguisher (RD) for a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
route_distinguisher: '22:22'
provider: "{{ cli }}"
- name: "Configure VPN targets to both the import and export VPN target lists of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_both: 22:100,22:101
provider: "{{ cli }}"
- name: "Configure VPN targets to the import VPN target list of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_import: 22:22,22:23
provider: "{{ cli }}"
- name: "Configure VPN targets to the export VPN target list of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_export: 22:38,22:39
provider: "{{ cli }}"
- name: "Unconfigure VPN targets to both the import and export VPN target lists of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_both: '22:100'
state: absent
provider: "{{ cli }}"
- name: "Unconfigure VPN targets to the import VPN target list of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_import: '22:22'
state: absent
provider: "{{ cli }}"
- name: "Unconfigure VPN targets to the export VPN target list of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_export: '22:38'
state: absent
provider: "{{ cli }}"
- name: "Unconfigure a route distinguisher (RD) of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
route_distinguisher: '22:22'
state: absent
provider: "{{ cli }}"
- name: "Unconfigure an EVPN instance for a VXLAN in BD view"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
evpn: disable
provider: "{{ cli }}"
返回值
通用返回值记录在此处,以下是此模块特有的字段
键 |
描述 |
---|---|
检查设备上是否进行了更改 返回: 始终 示例: |
|
设备上结束属性的 k/v 对 返回: 始终 示例: |
|
设备上现有属性的键/值对 返回: 始终 示例: |
|
传递到模块的参数的键/值对 返回: 始终 示例: |
|
发送到设备的命令列表 返回: 始终 示例: |
状态
此模块将在 6.0.0 版本中移除。[已弃用]
有关更多信息,请参阅 已弃用。