dellemc.enterprise_sonic.sonic_lag_interfaces module – Manage link aggregation group (LAG) interface parameters
Note
This module is part of the dellemc.enterprise_sonic collection (version 2.0.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install dellemc.enterprise\_sonic
.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_lag_interfaces
.
New in dellemc.enterprise_sonic 1.0.0
Synopsis
This module manages attributes of link aggregation group (LAG) interfaces of devices running Enterprise SONiC Distribution by Dell Technologies.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
---|---|
A list of LAG configurations. |
|
The list of interfaces that are part of the group. |
|
The list of interfaces that are part of the group. |
|
The interface name. |
|
Specifies mode of the port-channel while creation. Choices:
|
|
ID of the LAG. |
|
The state that the configuration should be left in. Choices:
|
Notes
Note
Tested against Enterprise SONiC Distribution by Dell Technologies.
Supports
check_mode
.
Examples
# 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 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
#
# After state:
# -------------
#
# interface Eth1/10
# mtu 9100
# speed 100000
# no shutdown
# !
# interface Eth1/15
# mtu 9100
# speed 100000
# no shutdown
#
#
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration model invocation. Returned: when changed Sample: |
|
The configuration prior to the model invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |