community.network.ce_vrf_af module – Manages VPN instance address family on HUAWEI CloudEngine switches.
Note
This module is part of the community.network collection (version 5.1.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.ce_vrf_af
.
Note
The community.network collection has been deprecated and will be removed from Ansible 12. See the discussion thread for more information.
DEPRECATED
- Removed in:
version 6.0.0
- Why:
This collection and all content in it is unmaintained and deprecated.
- Alternative:
Unknown.
Synopsis
Manages VPN instance address family of HUAWEI CloudEngine switches.
Aliases: network.cloudengine.ce_vrf_af
Parameters
Parameter |
Comments |
---|---|
Is extend vpn or normal vpn. Choices:
|
|
VPN instance route distinguisher,the RD used to distinguish same route prefix from different vpn. The RD must be setted before setting vpn_target_value. |
|
Manage the state of the af. Choices:
|
|
Manage the state of the vpn target. Choices:
|
|
VPN instance vpn target type. Choices:
|
|
VPN instance target value. Such as X.X.X.X:number<0-65535> or number<0-65535>:number<0-4294967295> or number<0-65535>.number<0-65535>:number<0-65535> or number<65536-4294967295>:number<0-65535> but not support 0:0 and 0.0:0. |
|
VPN instance. |
|
VPN instance address family. Choices:
|
Notes
Note
If state=absent, the vrf will be removed, regardless of the non-required parameters.
This module requires the netconf system service be enabled on the remote device being managed.
Recommended connection is
netconf
.This module also works with
local
connections for legacy playbooks.
Examples
- name: Vrf af module 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: Config vpna, set address family is ipv4
community.network.ce_vrf_af:
vrf: vpna
vrf_aftype: v4
state: present
provider: "{{ cli }}"
- name: Config vpna, delete address family is ipv4
community.network.ce_vrf_af:
vrf: vpna
vrf_aftype: v4
state: absent
provider: "{{ cli }}"
- name: Config vpna, set address family is ipv4,rd=1:1,set vpn_target_type=export_extcommunity,vpn_target_value=2:2
community.network.ce_vrf_af:
vrf: vpna
vrf_aftype: v4
route_distinguisher: 1:1
vpn_target_type: export_extcommunity
vpn_target_value: 2:2
vpn_target_state: present
state: present
provider: "{{ cli }}"
- name: Config vpna, set address family is ipv4,rd=1:1,delete vpn_target_type=export_extcommunity,vpn_target_value=2:2
community.network.ce_vrf_af:
vrf: vpna
vrf_aftype: v4
route_distinguisher: 1:1
vpn_target_type: export_extcommunity
vpn_target_value: 2:2
vpn_target_state: absent
state: present
provider: "{{ cli }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
check to see if a change was made on the device Returned: always Sample: |
|
k/v pairs of switchport after module execution Returned: always Sample: |
|
k/v pairs of existing switchport Returned: always Sample: |
|
k/v pairs of parameters passed into module Returned: always Sample: |
|
command list sent to the device Returned: always Sample: |
Status
This module will be removed in version 6.0.0. [deprecated]
For more information see DEPRECATED.