alliedtelesis.awplus.awplus_lacp_interfaces (1.2.2) — module

Manages the LACP attributes of AlliedWare Plus interfaces

| "added in version" 2.10.4 of alliedtelesis.awplus"

Authors: Darryl Alang

preview | supported by network

Install collection

Install with ansible-galaxy collection install alliedtelesis.awplus:==1.2.2


Add to requirements.yml

  collections:
    - name: alliedtelesis.awplus
      version: 1.2.2

Description

This module manages LACP configuration on aggregated interfaces of AlliedWare Plus devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Using merged

# Before state:
# -------------
# awplus#show running-config interface
# interface port1.0.1
#  switchport
#  switchport mode access
#  switchport access vlan 99
# !
# interface port1.0.2
#  switchport
#  switchport mode access
#  channel-group 2 mode active
#  lacp port-priority 2
#  lacp timeout short
# !
# interface port1.0.3
#  switchport
#  switchport mode access
#  channel-group 3 mode active
# !
# interface port1.0.4-1.0.28
#  switchport
#  switchport mode access
# !

- name: Merge provided configuration with device configuration
  alliedtelesis.awplus.awplus_lacp_interfaces:
    config:
      - name: port1.0.3
        port_priority: 3
    state: merged
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# After state:
# -------------
# awplus#show running-config interface
# interface port1.0.1
#  switchport
#  switchport mode access
#  switchport access vlan 99
# !
# interface port1.0.2
#  switchport
#  switchport mode access
#  channel-group 2 mode active
#  lacp port-priority 2
#  lacp timeout short
# !
# interface port1.0.3
#  switchport
#  switchport mode access
#  channel-group 3 mode active
#  lacp port-priority 3
# !
# interface port1.0.4-1.0.28
#  switchport
#  switchport mode access
# !


# Using replaced

# Before state:
# -------------
# awplus#show running-config interface
# interface port1.0.1
#  switchport
#  switchport mode access
#  switchport access vlan 99
# !
# interface port1.0.2
#  switchport
#  switchport mode access
#  channel-group 2 mode active
#  lacp port-priority 2
#  lacp timeout short
# !
# interface port1.0.3
#  switchport
#  switchport mode access
#  channel-group 3 mode active
#  lacp port-priority 3
# !
# interface port1.0.4-1.0.28
#  switchport
#  switchport mode access
# !

- name: Replace device configuration with provided configuration
  alliedtelesis.awplus.awplus_lacp_interfaces:
    config:
      - name: port1.0.3
        port_priority: 7
    state: replaced
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# After state:
# -------------
# awplus#show running-config interface
# interface port1.0.1
#  switchport
#  switchport mode access
#  switchport access vlan 99
# !
# interface port1.0.2
#  switchport
#  switchport mode access
#  channel-group 2 mode active
#  lacp port-priority 7
# !
# interface port1.0.3
#  switchport
#  switchport mode access
#  channel-group 3 mode active
#  lacp port-priority 3
# !
# interface port1.0.4-1.0.28
#  switchport
#  switchport mode access
# !


# Using overridden

# Before state:
# -------------
# awplus#show running-config interface
# interface port1.0.1
#  switchport
#  switchport mode access
#  switchport access vlan 99
# !
# interface port1.0.2
#  switchport
#  switchport mode access
#  channel-group 2 mode active
#  lacp port-priority 2
#  lacp timeout short
# !
# interface port1.0.3
#  switchport
#  switchport mode access
#  channel-group 3 mode active
#  lacp port-priority 3
# !
# interface port1.0.4-1.0.28
#  switchport
#  switchport mode access
# !

- name: Override device configuration of all interfaces with provided configuration
  alliedtelesis.awplus.awplus_lacp_interfaces:
    config:
      - name: port1.0.3
        timeout: short

      - name: vlan2
        description: Overridden by Ansible Network
        mtu: 920
        enabled: True
    state: overridden
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# -------------
# awplus#show running-config interface
# interface port1.0.1
#  switchport
#  switchport mode access
#  switchport access vlan 99
# !
# interface port1.0.2
#  switchport
#  switchport mode access
#  channel-group 2 mode active
# !
# interface port1.0.3
#  switchport
#  switchport mode access
#  channel-group 3 mode active
#  lacp timeout short
# !
# interface port1.0.4-1.0.28
#  switchport
#  switchport mode access
# !


# Using deleted

# Before state:
# -------------
# awplus#show running-config interface
# interface port1.0.1
#  switchport
#  switchport mode access
#  switchport access vlan 99
# !
# interface port1.0.2
#  switchport
#  switchport mode access
#  channel-group 2 mode active
#  lacp port-priority 2
#  lacp timeout short
# !
# interface port1.0.3
#  switchport
#  switchport mode access
#  channel-group 3 mode active
#  lacp port-priority 3
# !
# interface port1.0.4-1.0.28
#  switchport
#  switchport mode access
# !

- name: Delete module attributes of given interfaces (Note that this won't delete the interface itself)
  alliedtelesis.awplus.awplus_lacp_interfaces:
    config:
      - name: port1.0.2
    state: deleted
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# After state:
# -------------
# awplus#show running-config interface
# interface port1.0.1
#  switchport
#  switchport mode access
#  switchport access vlan 99
# !
# interface port1.0.2
#  switchport
#  switchport mode access
#  channel-group 2 mode active
# !
# interface port1.0.3
#  switchport
#  switchport mode access
#  channel-group 3 mode active
#  lacp port-priority 3
# !
# interface port1.0.4-1.0.28
#  switchport
#  switchport mode access
# !

# Using deleted without any config passed
# NOTE: This will delete all of configured resource module attributes from each configured interface

# Before state:
# -------------
# awplus#show running-config interface
# interface port1.0.1
#  switchport
#  switchport mode access
#  switchport access vlan 99
# !
# interface port1.0.2
#  switchport
#  switchport mode access
#  channel-group 2 mode active
#  lacp port-priority 2
#  lacp timeout short
# !
# interface port1.0.3
#  switchport
#  switchport mode access
#  channel-group 3 mode active
#  lacp port-priority 3
# !
# interface port1.0.4-1.0.28
#  switchport
#  switchport mode access
# !

- name: Delete module attributes of all interfaces
  alliedtelesis.awplus.awplus_lacp_interfaces:
    state: deleted

Inputs

    
state:
    choices:
    - merged
    - replaced
    - overridden
    - deleted
    default: merged
    description:
    - The state the configuration should be left in
    type: str

config:
    description: A dictionary of interface options.
    elements: dict
    suboptions:
      name:
        description:
        - Name of the interface to configure LACP on.
        required: true
        type: str
      port_priority:
        description:
        - Specify the LACP port priority. Valid values range 1-65535. Lower numbers correspond
          to higher priorities.
        type: int
      timeout:
        choices:
        - long
        - short
        description:
        - Number of seconds before invalidating a received LACP data unit (DU).
        - Short timeout value is 1 second while long timeout value is 30 seconds.
        type: str
    type: list

Outputs

after:
  description: The resulting configuration model invocation.
  returned: when changed
  sample: "The configuration returned will always be in the same format\n of the parameters\
    \ above.\n"
before:
  description: The configuration prior to the model invocation.
  returned: always
  sample: "The configuration returned will always be in the same format\n of the parameters\
    \ above.\n"
commands:
  description: The set of commands pushed to the remote device.
  returned: always
  sample:
  - interface port1.0.2
  - lacp timeout short
  type: list