community.general.onyx_l2_interface (0.1.1) — module

Manage Layer-2 interface 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 Layer-2 interface on Mellanox ONYX network devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: configure Layer-2 interface
  onyx_l2_interface:
    name: Eth1/1
    mode: access
    access_vlan: 30
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove Layer-2 interface configuration
  onyx_l2_interface:
    name: Eth1/1
    state: absent

Inputs

    
mode:
    choices:
    - access
    - trunk
    - hybrid
    default: access
    description:
    - Mode in which interface needs to be configured.

name:
    description:
    - Name of the interface.

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the Layer-2 Interface configuration.

aggregate:
    description:
    - List of Layer-2 interface definitions.

access_vlan:
    description:
    - Configure given VLAN in access port.

trunk_allowed_vlans:
    description:
    - List of allowed VLANs in a given trunk port.

Outputs

commands:
  description: The list of configuration mode commands to send to the device
  returned: always.
  sample:
  - interface ethernet 1/1
  - switchport mode access
  - switchport access vlan 30
  type: list