ce_evpn_bgp - Manages BGP EVPN configuration on HUAWEI CloudEngine switches.

New in version 2.4.

Synopsis

Parameters

Parameter Choices/Defaults Comments
advertise_l2vpn_evpn
    Choices:
  • enable
  • disable
Enable or disable a device to advertise IP routes imported to a VPN instance to its EVPN instance.
advertise_router_type
    Choices:
  • arp
  • irb
Configures a device to advertise routes to its BGP EVPN peers.
as_number
Specifies integral AS number. The value is an integer ranging from 1 to 4294967295.
bgp_instance
required
Name of a BGP instance. The value is a string of 1 to 31 case-sensitive characters, spaces not supported.
peer_address
Specifies the IPv4 address of a BGP EVPN peer. The value is in dotted decimal notation.
peer_enable
    Choices:
  • true
  • false
Enable or disable a BGP device to exchange routes with a specified peer or peer group in the address family view.
peer_group_name
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.
state
    Choices:
  • present ←
  • absent
Manage the state of the resource.
vpn_name
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.

Examples

- 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 }}"

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
verbose mode
k/v pairs of configuration after module execution

Sample:
{'vpn_name': 'aaa', 'bgp_instance': '100', 'advertise_l2vpn_evpn': 'enable'}
existing
dict
always
k/v pairs of existing rollback

Sample:
{'peer_group_advertise_type': [], 'bgp_instance': '100'}
proposed
dict
always
k/v pairs of parameters passed into module

Sample:
{'advertise_router_type': 'arp', 'state': 'present', 'bgp_instance': '100', 'peer_group_name': 'aaa'}
updates
list
always
command sent to the device

Sample:
['peer 1.1.1.1 enable', 'peer aaa advertise arp']


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

  • Li Yanfeng (@CloudEngine-Ansible)

Hint

If you notice any issues in this documentation you can edit this document to improve it.