ansible.builtin.onyx_bgp (v2.7.18) — module

Configures BGP on Mellanox ONYX network devices

| "added in version" 2.5 of ansible.builtin"

Authors: Samer Deeb (@samerd)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.7.18

Description

This module provides declarative management of BGP router and neighbors on Mellanox ONYX network devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: configure bgp
  onyx_bgp:
    as_number: 320
    router_id: 10.3.3.3
    neighbors:
      - remote_as: 321
        neighbor: 10.3.3.4
    state: present
    networks:
      - 172.16.1.0/24

Inputs

    
state:
    choices:
    - present
    - absent
    default: present
    description:
    - BGP state.

networks:
    description:
    - List of advertised networks.

as_number:
    description:
    - Local AS number.
    required: true

neighbors:
    description:
    - List of neighbors. Required if I(state=present).
    suboptions:
      neighbor:
        description:
        - Neighbor IP address.
        required: true
      remote_as:
        description:
        - Remote AS number.
        required: true

router_id:
    description:
    - Router IP address. Required if I(state=present).

Outputs

commands:
  description: The list of configuration mode commands to send to the device.
  returned: always
  sample:
  - router bgp 172
  - exit
  - router bgp 172 router-id 2.3.4.5 force
  - router bgp 172 neighbor 2.3.4.6 remote-as 173
  - router bgp 172 network 172.16.1.0 /24
  type: list