alliedtelesis / alliedtelesis.awplus / 1.1.0 / module / awplus_interfaces Manages the attributes of AlliedWare Plus interfaces | "added in version" 2.10.4 of alliedtelesis.awplus" Authors: Darryl Alang preview | supported by networkalliedtelesis.awplus.awplus_interfaces (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 interfaces configuration of AlliedWare Plus devices.
# Using merged # Before state: # ------------- # interface port1.0.1-1.0.4 # switchport # switchport mode access # ! # interface vlan1 # ip address 192.168.5.2/24 # ! - name: Merge provided configuration with device configuration alliedtelesis.awplus.awplus_interfaces: config: - name: port1.0.2 description: Merged by Ansible Network duplex: full - name: vlan1 description: Merged by Ansible Network mtu: 234 state: merged
# After state: # --------------------- # interface port1.0.1 # switchport # switchport mode access # ! # interface port1.0.2 # description Merged by Ansible Network # duplex full # switchport # switchport mode access # ! # interface port1.0.3-1.0.4 # switchport # switchport mode access # ! # interface vlan1 # description Merged by Ansible Network # mtu 234 # ip address 192.168.5.2/24 # ! # Using replaced # Before state: # ------------- # interface port1.0.1-1.0.2 # switchport # switchport mode access # ! # interface port1.0.3 # description Merged by Ansible Network # speed 1000 # duplex full # shutdown # switchport # switchport mode access # ! # interface port1.0.4 # duplex full # switchport # switchport mode access # ! # interface vlan1 # description Merged by Ansible Network # mtu 234 # ip address 192.168.5.2/24 # ! - name: Replace device configuration with provided configuration alliedtelesis.awplus.awplus_interfaces: config: - name: port1.0.3 description: Replaced by Ansible Network - name: vlan1 description: Replaced by Ansible Network mtu: 900 # in the range <68-1582> enabled: True state: replaced
# After state: # --------------------- # interface port1.0.1-1.0.2 # switchport # switchport mode access # ! # interface port1.0.3 # description Replaced by Ansible Network # switchport # switchport mode access # ! # interface port1.0.4 # duplex full # switchport # switchport mode access # ! # interface vlan1 # description Replaced by Ansible Network # mtu 900 # ip address 192.168.5.2/24 # ! # Using overridden # Before state: # ------------- # interface port1.0.1 # switchport # switchport mode access # ! # interface port1.0.2 # description Merged by Ansible Network # duplex full # switchport # switchport mode access # ! # interface port1.0.3 # description Replaced by Ansible Network # speed 1000 # duplex full # shutdown # switchport # switchport mode access # ! # interface port1.0.4 # switchport # switchport mode access # ! # # interface vlan1 # ip helper-address 172.26.3.8 # ! # interface vlan2 # ip address dhcp client-id vlan2 hostname test.com # ! # interface vlan5 # description Replaced by Ansible Network # mtu 900 # ! # interface vlan13 # ip address 13.13.13.13/24 # ! - name: Override device configuration of all interfaces with provided configuration alliedtelesis.awplus.awplus_interfaces: config: - name: port1.0.2 description: Overridden by Ansible Network duplex: full speed: 2500 enabled: True - name: vlan2 description: Overridden by Ansible Network mtu: 920 enabled: True state: overriden
# After state: # ------------------------- # interface port1.0.1 # switchport # switchport mode access # ! # interface port1.0.2 # description Overridden by Ansible Network # duplex full # switchport # switchport mode access # ! # interface port1.0.3-1.0.4 # switchport # switchport mode access # ! # interface vlan1 # ip helper-address 172.26.3.8 # ! # interface vlan2 # description Overridden by Ansible Network # mtu 920 # ip address dhcp client-id vlan2 hostname test.com # ! # interface vlan13 # ip address 13.13.13.13/24 # ! # Using deleted # Before state: # ------------- # interface port1.0.1 # switchport # switchport mode access # ! # interface port1.0.2 # description Merged by Ansible Network # duplex full # switchport # switchport mode access # ! # interface port1.0.3 # description Replaced by Ansible Network # speed 1000 # duplex full # shutdown # switchport # switchport mode access # ! # interface port1.0.4 # switchport # switchport mode access # ! # interface vlan1 # description Override by Ansible Network # ip address 192.168.5.2/24 # ! - name: Delete module attributes of given interfaces (Note that this won't delete the interface itself) alliedtelesis.awplus.awplus_interfaces: config: - name: port1.0.2 state: deleted
# After state: # --------------------------- # interface port1.0.1-1.0.2 # switchport # switchport mode access # ! # interface port1.0.3 # description Replaced by Ansible Network # speed 1000 # duplex full # shutdown # switchport # switchport mode access # ! # interface port1.0.4 # switchport # switchport mode access # ! # interface vlan1 # description Override by Ansible Network # ip address 192.168.5.2/24 # ! # Using deleted without any config passed # NOTE: This will delete all of configured resource module attributes from each configured interface # Before state: # ----------------------- # interface port1.0.1 # switchport # switchport mode access # ! # interface port1.0.2 # duplex full # switchport # switchport mode access # ! # interface port1.0.3 # description Replaced by Ansible Network # speed 1000 # duplex full # shutdown # switchport # switchport mode access # ! # interface port1.0.4 # description Override by Ansible Network # duplex full # switchport # switchport mode access # ! # interface vlan1 # description Override by Ansible Network # ip address 192.168.5.2/24 # ! - name: Delete module attributes of all interfaces alliedtelesis.awplus.awplus_interfaces: config: state: deleted
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. suboptions: description: description: - Interface specific description. type: str duplex: choices: - half - full - auto description: - Interface link status. Applicable for switchport interfaces only, either in half duplex, full duplex or in automatic state which negotiates the duplex automatically. - Note, some AlliedWare Plus devices does not support half duplex. Refer to documentation for valid values. type: str enabled: default: true description: - Administrative state of the interface. - Set the value to C(true) to administratively enable the interface or C(false) to disable it. type: bool mtu: description: - MTU size for a specific interface. Applicable for VLAN, ethernet and openflow interfaces only. - Refer to documentation for valid values. type: int name: description: - Full name of interface, interface range or comma-separated interfaces. Comma-separated interface names should be of the same type. required: true type: str speed: description: - Interface link speed. Applicable for ethernet and switchport interfaces only. type: str 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: - interface port1.0.2 - description lightning test type: list