dellemc / dellemc.enterprise_sonic / 2.4.0 / module / sonic_lag_interfaces Manage link aggregation group (LAG) interface parameters | "added in version" 1.0.0 of dellemc.enterprise_sonic" Authors: Abirami N (@abirami-n) This plugin has a corresponding action plugin.dellemc.enterprise_sonic.sonic_lag_interfaces (2.4.0) — module
Install with ansible-galaxy collection install dellemc.enterprise_sonic:==2.4.0
collections: - name: dellemc.enterprise_sonic version: 2.4.0
This module manages attributes of link aggregation group (LAG) interfaces of devices running Enterprise SONiC Distribution by Dell Technologies.
# Using merged # # Before state: # ------------- # # interface Eth1/10 # mtu 9100 # speed 100000 # no shutdown # ! # interface Eth1/15 # channel-group 12 # mtu 9100 # speed 100000 # no shutdown # - name: Merges provided configuration with device configuration dellemc.enterprise_sonic.sonic_lag_interfaces: config: - name: PortChannel10 members: interfaces: - member: Eth1/10 state: merged
# # After state: # ------------ # # interface Eth1/10 # channel-group 10 # mtu 9100 # speed 100000 # no shutdown # ! # interface Eth1/15 # channel-group 12 # mtu 9100 # speed 100000 # no shutdown # # Using replaced # # Before state: # ------------- # # interface Eth1/5 # channel-group 10 # mtu 9100 # speed 100000 # no shutdown # # interface Eth1/6 # channel-group 20 # mtu 9100 # speed 100000 # no shutdown # # interface Eth1/7 # no channel-group # mtu 9100 # speed 100000 # no shutdown # - name: Replace device configuration of specified LAG attributes dellemc.enterprise_sonic.sonic_lag_interfaces: config: - name: PortChannel10 members: interfaces: - member: Eth1/7 state: replaced
# # After state: # ------------ # # interface Eth1/5 # no channel-group # mtu 9100 # speed 100000 # no shutdown # # interface Eth1/6 # channel-group 20 # mtu 9100 # speed 100000 # no shutdown # # interface Eth1/7 # channel-group 10 # mtu 9100 # speed 100000 # no shutdown # # Using overridden # # Before state: # ------------- # # interface Eth1/5 # channel-group 10 # mtu 9100 # speed 100000 # no shutdown # # interface Eth1/6 # no channel-group # mtu 9100 # speed 100000 # no shutdown # # interface Eth1/7 # channel-group 2 # mtu 9100 # speed 100000 # no shutdown # - name: Override device configuration of all LAG attributes dellemc.enterprise_sonic.sonic_lag_interfaces: config: - name: PortChannel20 members: interfaces: - member: Eth1/6 state: overridden
# # After state: # ------------ # interface Eth1/5 # no channel-group # mtu 9100 # speed 100000 # no shutdown # # interface Eth1/6 # channel-group 20 # mtu 9100 # speed 100000 # no shutdown # # interface Eth1/7 # no channel-group # mtu 9100 # speed 100000 # no shutdown # # Using deleted # # Before state: # ------------- # interface PortChannel10 # ! # interface Eth1/10 # channel-group 10 # mtu 9100 # speed 100000 # no shutdown # - name: Deletes LAG attributes of a given interface, This does not delete the port-channel itself dellemc.enterprise_sonic.sonic_lag_interfaces: config: - name: PortChannel10 members: interfaces: state: deleted
# # After state: # ------------ # interface PortChannel10 # ! # interface Eth1/10 # mtu 9100 # speed 100000 # no shutdown # # Using deleted # # Before state: # ------------- # interface PortChannel 10 # ! # interface PortChannel 12 # ! # interface Eth1/10 # channel-group 10 # mtu 9100 # speed 100000 # no shutdown # ! # interface Eth1/15 # channel-group 12 # mtu 9100 # speed 100000 # no shutdown # - name: Deletes all LAGs and LAG attributes of all interfaces dellemc.enterprise_sonic.sonic_lag_interfaces: config: state: deleted
state: choices: - merged - replaced - overridden - deleted default: merged description: - The state that the configuration should be left in. type: str config: description: A list of LAG configurations. elements: dict suboptions: members: description: - The list of interfaces that are part of the group. suboptions: interfaces: description: The list of interfaces that are part of the group. elements: dict suboptions: member: description: - The interface name. type: str type: list type: dict mode: choices: - static - lacp description: - Specifies mode of the port-channel while creation. type: str name: description: - ID of the LAG. required: true type: str type: list
after: description: The resulting configuration model invocation. returned: when changed sample: 'The configuration returned is always in the same format of the parameters above. ' type: list before: description: The configuration prior to the model invocation. returned: always sample: "The configuration that is returned is always in the same format\n of the\ \ parameters above.\n" type: list commands: description: The set of commands pushed to the remote device. returned: always sample: - command 1 - command 2 - command 3 type: list