community.general.ce_vxlan_tunnel (0.1.1) — module

Manages VXLAN tunnel configuration on HUAWEI CloudEngine devices.

Authors: Li Yanfeng (@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

This module offers the ability to set the VNI and mapped to the BD, and configure an ingress replication list on HUAWEI CloudEngine devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: vxlan tunnel module test
  hosts: ce128
  connection: local
  gather_facts: no
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli

  tasks:

  - name: Make sure nve_name is exist, ensure vni_id and protocol_type is configured on Nve1 interface.
    ce_vxlan_tunnel:
      nve_name: Nve1
      vni_id: 100
      protocol_type: bgp
      state: present
      provider: "{{ cli }}"

Inputs

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

vni_id:
    description:
    - Specifies a VXLAN network identifier (VNI) ID. The value is an integer ranging from
      1 to 16000000.

nve_mode:
    choices:
    - mode-l2
    - mode-l3
    description:
    - Specifies the working mode of an NVE interface.

nve_name:
    description:
    - Specifies the number of an NVE interface. The value ranges from 1 to 2.

source_ip:
    description:
    - Specifies an IP address for a source VTEP. The value is in dotted decimal notation.

peer_list_ip:
    description:
    - Specifies the IP address of a remote VXLAN tunnel endpoints (VTEP). The value is
      in dotted decimal notation.

protocol_type:
    choices:
    - bgp
    - 'null'
    description:
    - The operation type of routing protocol.

bridge_domain_id:
    description:
    - Specifies a bridge domain ID. The value is an integer ranging from 1 to 16777215.

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 configuration after module execution
  returned: always
  sample:
    nve_interface_name": Nve1
    nve_mode": mode-l3
    source_ip: 0.0.0.0
  type: dict
existing:
  description:
  - k/v pairs of existing rollback
  returned: always
  sample:
    nve_interface_name": Nve1
    nve_mode": mode-l3
    source_ip: 0.0.0.0
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    nve_interface_name": Nve1
    nve_mode": mode-l2
    source_ip: 0.0.0.0
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - interface Nve1
  - mode l3
  type: list