alliedtelesis / alliedtelesis.awplus / 1.1.0 / module / awplus_vlans Manages VLAN configuration of AlliedWare Plus devices | "added in version" 2.10.4 of alliedtelesis.awplus" Authors: Darryl Alang preview | supported by networkalliedtelesis.awplus.awplus_vlans (1.1.0) — module
Install with ansible-galaxy collection install alliedtelesis.awplus:==1.1.0
collections: - name: alliedtelesis.awplus version: 1.1.0
This module manages VLAN configuration of AlliedWare Plus devices.
# Using merged # Before state: # ------------- # awplus#show vlan all # VLAN ID Name Type State Member ports # (u)-Untagged, (t)-Tagged # ======= ================ ======= ======= ==================================== # 1 default STATIC ACTIVE port1.0.1(u) port1.0.2(u) port1.0.3(u) # port1.0.4(u) - name: Merge provided configuation to device configuation alliedtelesis.awplus.awplus_vlans: config: - vlan_id: 2 name: MONO - vlan_id: 3 state: suspend state: merged
# After state: # ------------- # awplus#show vlan all # VLAN ID Name Type State Member ports # (u)-Untagged, (t)-Tagged # ======= ================ ======= ======= ==================================== # 1 default STATIC ACTIVE port1.0.1(u) port1.0.2(u) port1.0.3(u) # port1.0.4(u) # 2 MONO STATIC ACTIVE # 3 VLAN0003 STATIC SUSPEND # Using replaced # Before state: # ------------- # awplus#show vlan all # VLAN ID Name Type State Member ports # (u)-Untagged, (t)-Tagged # ======= ================ ======= ======= ==================================== # 1 default STATIC ACTIVE port1.0.1(u) port1.0.2(u) port1.0.3(u) # port1.0.4(u) # 2 MONO STATIC ACTIVE # 3 VLAN0003 STATIC SUSPEND - name: Replace device configuation with provided configuation alliedtelesis.awplus.awplus_vlans: config: - vlan_id: 2 state: suspend state: replaced
# After state: # ------------- # awplus#show vlan all # VLAN ID Name Type State Member ports # (u)-Untagged, (t)-Tagged # ======= ================ ======= ======= ==================================== # 1 default STATIC ACTIVE port1.0.1(u) port1.0.2(u) port1.0.3(u) # port1.0.4(u) # 2 VLAN0002 STATIC SUSPEND # 3 VLAN0003 STATIC SUSPEND # Using overridden # Before state: # ------------- # awplus#show vlan all # VLAN ID Name Type State Member ports # (u)-Untagged, (t)-Tagged # ======= ================ ======= ======= ==================================== # 1 default STATIC ACTIVE port1.0.3(u) port1.0.4(u) # 2 MONO STATIC ACTIVE port1.0.2(u) # 3 VLAN0003 STATIC SUSPEND port1.0.3(t) # 4 VLAN0004 STATIC ACTIVE port1.0.3(t) # 5 VLAN0005 STATIC ACTIVE # 6 VLAN0006 STATIC ACTIVE # 99 VLAN0099 STATIC ACTIVE port1.0.1(u) - name: Override device configuation with provided configuation alliedtelesis.awplus.awplus_vlans: config: - vlan_id: 2 state: suspend name: moonchild state: overridden
# After state: # ------------- # awplus#show vlan all # VLAN ID Name Type State Member ports # (u)-Untagged, (t)-Tagged # ======= ================ ======= ======= ==================================== # 1 default STATIC ACTIVE port1.0.1(u) port1.0.2(u) port1.0.3(u) # port1.0.4(u) # 2 moonchild STATIC SUSPEND # Using deleted # Before state: # ------------- # awplus#show vlan all # VLAN ID Name Type State Member ports # (u)-Untagged, (t)-Tagged # ======= ================ ======= ======= ==================================== # 1 default STATIC ACTIVE port1.0.3(u) port1.0.4(u) # 2 MONO STATIC ACTIVE port1.0.2(u) # 3 VLAN0003 STATIC SUSPEND port1.0.3(t) # 4 VLAN0004 STATIC ACTIVE port1.0.3(t) # 5 VLAN0005 STATIC ACTIVE # 6 VLAN0006 STATIC ACTIVE # 99 VLAN0099 STATIC ACTIVE port1.0.1(u) - name: Delete all vlans alliedtelesis.awplus.awplus_vlans: config: - vlan_id: 5 - vlan_id: 6 state: deleted
# After state: # ------------- # awplus#show vlan all # VLAN ID Name Type State Member ports # (u)-Untagged, (t)-Tagged # ======= ================ ======= ======= ==================================== # 1 default STATIC ACTIVE port1.0.3(u) port1.0.4(u) # 2 MONO STATIC ACTIVE port1.0.2(u) # 3 VLAN0003 STATIC SUSPEND port1.0.3(t) # 4 VLAN0004 STATIC ACTIVE port1.0.3(t) # 99 VLAN0099 STATIC ACTIVE port1.0.1(u) # Using Deleted without any config passed # Before state: # ------------- # awplus#show vlan all # VLAN ID Name Type State Member ports # (u)-Untagged, (t)-Tagged # ======= ================ ======= ======= ==================================== # 1 default STATIC ACTIVE port1.0.3(u) port1.0.4(u) # 2 MONO STATIC ACTIVE port1.0.2(u) # 3 VLAN0003 STATIC SUSPEND port1.0.3(t) # 4 VLAN0004 STATIC ACTIVE port1.0.3(t) # 5 VLAN0005 STATIC ACTIVE # 6 VLAN0006 STATIC ACTIVE # 99 VLAN0099 STATIC ACTIVE port1.0.1(u) - name: Delete all vlans alliedtelesis.awplus.awplus_vlans: state: deleted
state: choices: - merged - replaced - overridden - deleted default: merged description: - The state the configuration should be left in - Note that I(state=deleted) and I(state=overridden) will not remove the default vlan 1. type: str config: description: The provided configuration. elements: dict suboptions: name: description: - The ASCII name of the VLAN. Maximum length is 32 characters. type: str state: choices: - active - suspend description: - Operational state of the VLAN type: str vlan_id: description: - The ID of the VLAN to enable or disable, in the range 1-4094. required: true type: int type: list
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: - vlan 4 name airplane state disable type: list