ce_vrf_af - Manages VPN instance address family on HUAWEI CloudEngine switches.¶
New in version 2.4.
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
evpn
bool |
|
Is extend vpn or normal vpn.
|
route_distinguisher |
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.
|
|
state |
|
Manage the state of the af.
|
vpn_target_state |
|
Manage the state of the vpn target.
|
vpn_target_type |
|
VPN instance vpn target type.
|
vpn_target_value |
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.
|
|
vrf
required |
VPN instance.
|
|
vrf_aftype |
|
VPN instance address family.
|
Examples¶
- name: vrf af module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Config vpna, set address family is ipv4
ce_vrf_af:
vrf: vpna
vrf_aftype: v4
state: present
provider: "{{ cli }}"
- name: Config vpna, delete address family is ipv4
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
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
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 | Returned | Description |
---|---|---|
changed
boolean
|
always |
check to see if a change was made on the device
Sample:
True
|
end_state
dict
|
always |
k/v pairs of switchport after module execution
Sample:
{'vpn_target_type': ['import_extcommunity', '3:3'], 'vpn_target_value': [], 'route_distinguisher': ['1:1', '2:2'], 'vrf': 'vpna', 'vrf_aftype': ['ipv4uni', 'ipv6uni']}
|
existing
dict
|
always |
k/v pairs of existing switchport
Sample:
{'vpn_target_type': [], 'vpn_target_value': [], 'route_distinguisher': ['1:1', '2:2'], 'vrf': 'vpna', 'vrf_aftype': ['ipv4uni', 'ipv6uni']}
|
proposed
dict
|
always |
k/v pairs of parameters passed into module
Sample:
{'vpn_target_type': 'none', 'vpn_targe_state': 'absent', 'state': 'present', 'vrf': 'vpna', 'vrf_aftype': 'v4', 'evpn': 'none', 'vpn_target_value': 'none'}
|
updates
list
|
always |
command list sent to the device
Sample:
['ip vpn-instance vpna', 'vpn-target 3:3 import_extcommunity']
|
Status¶
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance¶
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author¶
- Yang yang (@CloudEngine-Ansible)
Hint
If you notice any issues in this documentation you can edit this document to improve it.