ansible.builtin.onyx_vlan (v2.9.27) — module

Manage VLANs on Mellanox ONYX network devices

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

Authors: Samer Deeb (@samerd) Alex Tabachnik (@atabachnik)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

This module provides declarative management of VLANs on Mellanox ONYX network devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: configure VLAN ID and name
  onyx_vlan:
    vlan_id: 20
    name: test-vlan
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove configuration
  onyx_vlan:
    state: absent

Inputs

    
name:
    description:
    - Name of the VLAN.

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

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the VLAN configuration.

vlan_id:
    description:
    - ID of the VLAN.

aggregate:
    description: List of VLANs definitions.

Outputs

commands:
  description: The list of configuration mode commands to send to the device
  returned: always.
  sample:
  - vlan 20
  - name test-vlan
  - exit
  type: list