community.general.slxos_interface (0.1.1) — module

Manage Interfaces on Extreme SLX-OS network devices

Authors: Lindsay Hill (@LindsayHill)

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 Interfaces on Extreme SLX-OS network devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: configure interface
  slxos_interface:
      name: Ethernet 0/2
      description: test-interface
      speed: 1000
      mtu: 9216
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove interface
  slxos_interface:
    name: Loopback 9
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: make interface up
  slxos_interface:
    name: Ethernet 0/2
    enabled: True
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: make interface down
  slxos_interface:
    name: Ethernet 0/2
    enabled: False
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Check intent arguments
  slxos_interface:
    name: Ethernet 0/2
    state: up
    tx_rate: ge(0)
    rx_rate: le(0)
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Check neighbors intent arguments
  slxos_interface:
    name: Ethernet 0/41
    neighbors:
    - port: Ethernet 0/41
      host: SLX
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Config + intent
  slxos_interface:
    name: Ethernet 0/2
    enabled: False
    state: down
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add interface using aggregate
  slxos_interface:
    aggregate:
    - { name: Ethernet 0/1, mtu: 1548, description: test-interface-1 }
    - { name: Ethernet 0/2, mtu: 1548, description: test-interface-2 }
    speed: 10000
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete interface using aggregate
  slxos_interface:
    aggregate:
    - name: Loopback 9
    - name: Loopback 10
    state: absent

Inputs

    
mtu:
    description:
    - Maximum size of transmit packet.

name:
    description:
    - Name of the Interface.
    required: true

delay:
    default: 10
    description:
    - Time in seconds to wait before checking for the operational state on remote device.
      This wait is applicable for operational state argument which are I(state) with values
      C(up)/C(down), I(tx_rate) and I(rx_rate).

speed:
    description:
    - Interface link speed.

state:
    choices:
    - present
    - absent
    - up
    - down
    default: present
    description:
    - State of the Interface configuration, C(up) means present and operationally up and
      C(down) means present and operationally C(down)

enabled:
    default: true
    description:
    - Interface link status.
    type: bool

rx_rate:
    description:
    - Receiver rate in bits per second (bps).

tx_rate:
    description:
    - Transmit rate in bits per second (bps).

aggregate:
    description: List of Interfaces definitions.

neighbors:
    description:
    - Check the operational state of given interface C(name) for LLDP neighbor.
    - The following suboptions are available.
    suboptions:
      host:
        description:
        - LLDP neighbor host for given interface C(name).
      port:
        description:
        - LLDP neighbor port to which given interface C(name) is connected.

description:
    description:
    - Description of Interface.

Outputs

commands:
  description: The list of configuration mode commands to send to the device.
  returned: always, except for the platforms that use Netconf transport to manage
    the device.
  sample:
  - interface Ethernet 0/2
  - description test-interface
  - mtu 1548
  type: list