alliedtelesis / alliedtelesis.awplus / 1.2.2 / module / awplus_l3_interfaces Manages attributes of AlliedWare Plus Layer 3 interfaces. | "added in version" 2.10.4 of alliedtelesis.awplus" Authors: Ansible Network Engineer preview | supported by networkalliedtelesis.awplus.awplus_l3_interfaces (1.2.2) — module
Install with ansible-galaxy collection install alliedtelesis.awplus:==1.2.2
collections: - name: alliedtelesis.awplus version: 1.2.2
Manages attributes of AlliedWare Plus Layer 3 interfaces
# Using merged # # Before state: # ------------- # awplus#show running-config interface # ... # interface vlan2 # ip address dhcp client-id vlan2 hostname test.com # ! # interface vlan3 # ipv6 address 2003:db8::ffdf/64 # ! # interface vlan4 # ip address dhcp # ! # interface vlan5 # ipv6 address 2001:db8::a2/64 # ipv6 address dhcp # ! # interface vlan99 # ip address 10.38.55.3/27 # ! - name: Merge l3 interfaces configuration with provided configuration alliedtelesis.awplus.awplus_l3_interfaces: config: - name: vlan99 ipv4: - address: 192.168.0.2/24 secondary: True state: merged
# After state: # ------------ # awplus#show running-config interface # ... # interface vlan2 # ip address dhcp client-id vlan2 hostname test.com # ! # interface vlan3 # ipv6 address 2003:db8::ffdf/64 # ! # interface vlan4 # ip address dhcp # ! # interface vlan5 # ipv6 address 2001:db8::a2/64 # ipv6 address dhcp # ! # interface vlan99 # ip address 10.38.55.3/27 # ip address 192.168.0.2/24 secondary # ! # Using replaced # # Before state: # ------------- # awplus#show running-config interface # ... # interface vlan2 # ip address dhcp client-id vlan2 hostname test.com # ! # interface vlan3 # ipv6 address 2003:db8::ffdf/64 # ! # interface vlan4 # ip address dhcp # ! # interface vlan5 # ipv6 address 2001:db8::a2/64 # ipv6 address dhcp # ! # interface vlan99 # ip address 10.38.55.3/27 # ! - name: Replace listed l3 interfaces configuration with provided configuration alliedtelesis.awplus.awplus_l3_interfaces: config: - name: vlan5 ipv4: - address: 7.6.13.97/24 state: replaced
# After state: # ------------- # awplus#show running-config interface # ... # interface vlan2 # ip address dhcp client-id vlan2 hostname test.com # ! # interface vlan3 # ipv6 address 2003:db8::ffdf/64 # ! # interface vlan4 # ip address dhcp # ! # interface vlan5 # ip address 7.6.13.97/24 # ! # interface vlan99 # ip address 10.38.55.3/27 # ! # Using overridden # # Before state: # ------------- # awplus#show running-config interface # ... # interface vlan2 # description vlan2 # ip address dhcp client-id vlan2 hostname test.com # ! # interface vlan3 # description vlan3 # ipv6 address 2003:db8::ffdf/64 # ! # interface vlan4 # description vlan4 # ip address dhcp # ! # interface vlan5 # description vlan5 # ipv6 address 2001:db8::a2/64 # ipv6 address dhcp # ! # interface vlan99 # ip address 10.38.55.3/27 # ! - name: Override l3 interfaces configuration with provided configuration alliedtelesis.awplus.awplus_l3_interfaces: config: - name: vlan99 ipv4: - address: 10.38.55.3/27 state: overridden
# After state: # ------------ # awplus#show running-config interface # ... # interface vlan2 # description vlan2 # ! # interface vlan3 # description vlan3 # ! # interface vlan4 # description vlan4 # ! # interface vlan5 # description vlan5 # ! # interface vlan99 # ip address 10.38.55.3/27 # ! # Using deleted # # Before state: # ------------- # awplus#show running-config interface # ... # interface vlan2 # ip address dhcp client-id vlan2 hostname test.com # ! # interface vlan3 # ipv6 address 2003:db8::ffdf/64 # ! # interface vlan4 # ip address dhcp # ! # interface vlan5 # description vlan5 # ipv6 address 2001:db8::a2/64 # ipv6 address dhcp # ! # interface vlan99 # ip address 10.38.55.3/27 # ! - name: Delete attributes of given interface alliedtelesis.awplus.awplus_l3_interfaces: config: - name: vlan5 state: deleted
state: choices: - merged - replaced - overridden - deleted default: merged description: - The state the configuration should be left in type: str config: description: The provided configuration. elements: dict suboptions: ipv4: description: - The primary IPv4 address on the interface in the format <ip-addr/prefix-length>. elements: dict suboptions: address: description: - Sets the IPv4 address for the interface. required: true type: str dhcp_client: description: - The ID of the interface you are activating the DHCP client on. type: int dhcp_hostname: description: - hostname for the DHCP client on this interface. Typically this name is provided by the ISP. type: str secondary: description: - Adds additional IP addresses on this interface. A primary address on the interface must be set before configuring a secondary address. type: bool type: list ipv6: description: - Specifies the IPv6 address to be set. The IPv6 address uses the format X:X::X:X/Prefix-Length. The prefix-length is usually set between 0 and 64. elements: dict suboptions: address: description: - Configures the IPv6 address for interface required: true type: str type: list name: description: The full name of the Layer 3 interfaces. required: true 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 vlan5 - ipv6 address dhcp type: list