cisco.nxos.nxos_lacp – LACP resource module¶
Note
This plugin is part of the cisco.nxos collection (version 1.4.0).
To install it use: ansible-galaxy collection install cisco.nxos
.
To use it in a playbook, specify: cisco.nxos.nxos_lacp
.
New in version 1.0.0: of cisco.nxos
Synopsis¶
This module manages Global Link Aggregation Control Protocol (LACP) on NX-OS devices.
Note
This module has a corresponding action plugin.
Parameters¶
Notes¶
Note
Tested against NXOS 7.3.(0)D1(1) on VIRL.
Feature lacp should be enabled for this module.
Examples¶
# Using merged
# Before state:
# -------------
#
- name: Merge provided configuration with device configuration.
cisco.nxos.nxos_lacp:
config:
system:
priority: 10
mac:
address: 00c1.4c00.bd15
state: merged
# After state:
# ------------
#
# lacp system-priority 10
# lacp system-mac 00c1.4c00.bd15
# Using replaced
# Before state:
# -------------
#
# lacp system-priority 10
- name: Replace device global lacp configuration with the given configuration.
cisco.nxos.nxos_lacp:
config:
system:
mac:
address: 00c1.4c00.bd15
state: replaced
# After state:
# ------------
#
# lacp system-mac 00c1.4c00.bd15
# Using deleted
# Before state:
# -------------
#
# lacp system-priority 10
- name: Delete global LACP configurations.
cisco.nxos.nxos_lacp:
state: deleted
# After state:
# ------------
#
# Using rendered
- name: Render platform specific configuration lines (without connecting to the device)
cisco.nxos.nxos_lacp:
config:
system:
priority: 10
mac:
address: 00c1.4c00.bd15
role: secondary
state: rendered
# Task Output (redacted)
# -----------------------
# rendered:
# - "lacp system-priority 10"
# - "lacp system-mac 00c1.4c00.bd15 role secondary"
# Using parsed
# parsed.cfg
# ------------
# lacp system-priority 10
# lacp system-mac 00c1.4c00.bd15 role secondary
- name: Use parsed state to convert externally supplied config to structured format
cisco.nxos.nxos_lacp:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Task output (redacted)
# -----------------------
# parsed:
# system:
# priority: 10
# mac:
# address: 00c1.4c00.bd15
# role: secondary
# Using gathered
# Existing device config state
# -------------------------------
# Nexus9000v# show running-config | include lacp
# lacp system-priority 11
# lacp system-mac 00c1.4c00.bd15 role primary
- name: Gather lacp facts from the device using nxos_lacp
cisco.nxos.nxos_lacp:
state: gathered
# Task output (redacted)
# -----------------------
# gathered:
# system:
# priority: 11
# mac:
# address: 00c1.4c00.bd15
# role: primary
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Trishna Guha (@trishnaguha)