community.general.ce_evpn_bgp (0.1.1) — module

Manages BGP EVPN configuration on HUAWEI CloudEngine switches.

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 configure a BGP EVPN peer relationship on HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: evpn bgp 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: Enable peer address.
    ce_evpn_bgp:
      bgp_instance: 100
      peer_address: 1.1.1.1
      as_number: 100
      peer_enable: true
      provider: "{{ cli }}"

  - name: Enable peer group arp.
    ce_evpn_bgp:
      bgp_instance: 100
      peer_group_name: aaa
      advertise_router_type: arp
      provider: "{{ cli }}"

  - name: Enable advertise l2vpn evpn.
    ce_evpn_bgp:
      bgp_instance: 100
      vpn_name: aaa
      advertise_l2vpn_evpn: enable
      provider: "{{ cli }}"

Inputs

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

vpn_name:
    description:
    - Associates a specified VPN instance with the IPv4 address family. The value is a
      string of 1 to 31 case-sensitive characters, spaces not supported.

as_number:
    description:
    - Specifies integral AS number. The value is an integer ranging from 1 to 4294967295.

peer_enable:
    choices:
    - 'true'
    - 'false'
    description:
    - Enable or disable a BGP device to exchange routes with a specified peer or peer
      group in the address family view.

bgp_instance:
    description:
    - Name of a BGP instance. The value is a string of 1 to 31 case-sensitive characters,
      spaces not supported.
    required: true

peer_address:
    description:
    - Specifies the IPv4 address of a BGP EVPN peer. The value is in dotted decimal notation.

peer_group_name:
    description:
    - Specify the name of a peer group that BGP peers need to join. The value is a string
      of 1 to 47 case-sensitive characters, spaces not supported.

advertise_l2vpn_evpn:
    choices:
    - enable
    - disable
    description:
    - Enable or disable a device to advertise IP routes imported to a VPN instance to
      its EVPN instance.

advertise_router_type:
    choices:
    - arp
    - irb
    description:
    - Configures a device to advertise routes to its BGP EVPN peers.

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: verbose mode
  sample:
    advertise_l2vpn_evpn: enable
    bgp_instance: '100'
    vpn_name: aaa
  type: dict
existing:
  description: k/v pairs of existing rollback
  returned: always
  sample:
    bgp_instance: '100'
    peer_group_advertise_type: []
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    advertise_router_type: arp
    bgp_instance: '100'
    peer_group_name: aaa
    state: present
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - peer 1.1.1.1 enable
  - peer aaa advertise arp
  type: list