ansible / ansible.builtin / v2.4.2.0-1 / module / ce_vrf_af Manages VPN instance address family on HUAWEI CloudEngine switches. | "added in version" 2.4 of ansible.builtin" Authors: Yang yang (@CloudEngine-Ansible) preview | supported by communityansible.builtin.ce_vrf_af (v2.4.2.0-1) — module
pip
Install with pip install ansible==2.4.2.0.post1
Manages VPN instance address family of HUAWEI CloudEngine switches.
- 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 }}"
vrf: default: null description: - VPN instance. required: true evpn: choices: - 'true' - 'false' default: false description: - Is extend vpn or normal vpn. required: false state: choices: - present - absent default: present description: - Manage the state of the af. required: false vrf_aftype: choices: - v4 - v6 default: v4 description: - VPN instance address family. required: false vpn_target_type: choices: - export_extcommunity - import_extcommunity default: null description: - VPN instance vpn target type. required: false vpn_target_state: choices: - present - absent description: - Manage the state of the vpn target. required: false vpn_target_value: description: - 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. required: false route_distinguisher: description: - 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. required: false
changed: description: check to see if a change was made on the device returned: always sample: true type: boolean end_state: description: k/v pairs of switchport after module execution returned: always sample: route_distinguisher: - '1:1' - '2:2' vpn_target_type: - import_extcommunity - '3:3' vpn_target_value: [] vrf: vpna vrf_aftype: - ipv4uni - ipv6uni type: dict existing: description: k/v pairs of existing switchport returned: always sample: route_distinguisher: - '1:1' - '2:2' vpn_target_type: [] vpn_target_value: [] vrf: vpna vrf_aftype: - ipv4uni - ipv6uni type: dict proposed: description: k/v pairs of parameters passed into module returned: always sample: evpn: none state: present vpn_targe_state: absent vpn_target_type: none vpn_target_value: none vrf: vpna vrf_aftype: v4 type: dict updates: description: command list sent to the device returned: always sample: - ip vpn-instance vpna - vpn-target 3:3 import_extcommunity type: list