community.general.onyx_linkagg (0.1.1) — module

Manage link aggregation groups on Mellanox ONYX network devices

Authors: Samer Deeb (@samerd)

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 provides declarative management of link aggregation groups on Mellanox ONYX network devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: configure link aggregation group
  onyx_linkagg:
    name: Po1
    members:
      - Eth1/1
      - Eth1/2
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove configuration
  onyx_linkagg:
    name: Po1
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create aggregate of linkagg definitions
  onyx_linkagg:
    aggregate:
        - { name: Po1, members: [Eth1/1] }
        - { name: Po2, members: [Eth1/2] }
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove aggregate of linkagg definitions
  onyx_linkagg:
    aggregate:
      - name: Po1
      - name: Po2
    state: absent

Inputs

    
mode:
    choices:
    - 'on'
    - active
    - passive
    default: true
    description:
    - Mode of the link aggregation group. A value of C(on) will enable LACP. C(active)
      configures the link to actively information about the state of the link, or it can
      be configured in C(passive) mode ie. send link state information only when received
      them from another link.

name:
    description:
    - Name of the link aggregation group.
    required: true

purge:
    default: false
    description:
    - Purge link aggregation groups not defined in the I(aggregate) parameter.
    type: bool

state:
    choices:
    - present
    - absent
    - up
    - down
    default: present
    description:
    - State of the link aggregation group.

members:
    description:
    - List of members interfaces of the link aggregation group. The value can be single
      interface or list of interfaces.
    required: true

aggregate:
    description: List of link aggregation definitions.

Outputs

commands:
  description: The list of configuration mode commands to send to the device
  returned: always.
  sample:
  - interface port-channel 1
  - exit
  - interface ethernet 1/1 channel-group 1 mode on
  - interface ethernet 1/2 channel-group 1 mode on
  type: list