community.general.ce_vrf (0.1.1) — module

Manages VPN instance on HUAWEI CloudEngine switches.

Authors: Yang yang (@QijunPan)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Manages VPN instance of HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: vrf 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 a vpn install named vpna, description is test
    ce_vrf:
      vrf: vpna
      description: test
      state: present
      provider: "{{ cli }}"
  - name: Delete a vpn install named vpna
    ce_vrf:
      vrf: vpna
      state: absent
      provider: "{{ cli }}"

Inputs

    
vrf:
    description:
    - VPN instance, the length of vrf name is 1 - 31, i.e. "test", but can not be C(_public_).
    required: true

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Manage the state of the resource.

description:
    description:
    - Description of the vrf, the string length is 1 - 242 .

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: true
  type: bool
end_state:
  description: k/v pairs of switchport after module execution
  returned: always
  sample:
    description: test
    present: present
    vrf: vpna
  type: dict
existing:
  description: k/v pairs of existing switchport
  returned: always
  sample: {}
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    description: test
    state: present
    vrf: vpna
  type: dict
updates:
  description: command list sent to the device
  returned: always
  sample:
  - ip vpn-instance vpna
  - description test
  type: list