ansible.builtin.eos_vlan (v2.4.3.0-1) — module

Manage VLANs on Arista EOS network devices

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

Authors: Ricardo Carrillo Cruz (@rcarrillocruz)

preview | supported by network

Install Ansible via pip

Install with pip install ansible==2.4.3.0.post1

Description

This module provides declarative management of VLANs on Arista EOS network devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create vlan
  eos_vlan:
    vlan_id: 4000
    name: vlan-4000
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add interfaces to vlan
  eos_vlan:
    vlan_id: 4000
    state: present
    interfaces:
      - Ethernet1
      - Ethernet2
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Suspend vlan
  eos_vlan:
    vlan_id: 4000
    state: suspend
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Unsuspend vlan
  eos_vlan:
    vlan_id: 4000
    state: active
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create aggregate of vlans
  eos_vlan:
    aggregate:
      - vlan_id: 4000
      - {vlan_id: 4001, name: vlan-4001}

Inputs

    
name:
    description:
    - Name of the VLAN.

delay:
    default: 10
    description:
    - Delay the play should wait to check for declarative intent params values.

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

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

vlan_id:
    description:
    - ID of the VLAN.
    required: true

aggregate:
    description: List of VLANs definitions.

interfaces:
    description:
    - List of interfaces that should be associated to the VLAN.

Outputs

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