Resource module to configure LACP.
Version added: 1.0.0
- This module provides declarative management of Global LACP on Cisco IOS network devices.
Note
- Tested against Cisco IOSXE Version 17.3 on CML.
- This module works with connection
network_cli
. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html
# Using merged
#
# Before state:
# -------------
#
# vios#show lacp sys-id
# 32768, 5e00.0000.8000
- name: Merge provided configuration with device configuration
cisco.ios.ios_lacp:
config:
system:
priority: 123
state: merged
# After state:
# ------------
#
# vios#show lacp sys-id
# 123, 5e00.0000.8000
# Using replaced
#
# Before state:
# -------------
#
# vios#show lacp sys-id
# 500, 5e00.0000.8000
- name: Replaces Global LACP configuration
cisco.ios.ios_lacp:
config:
system:
priority: 123
state: replaced
# After state:
# ------------
#
# vios#show lacp sys-id
# 123, 5e00.0000.8000
# Using Deleted
#
# Before state:
# -------------
#
# vios#show lacp sys-id
# 500, 5e00.0000.8000
- name: Delete Global LACP attribute
cisco.ios.ios_lacp:
state: deleted
# After state:
# -------------
#
# vios#show lacp sys-id
# 32768, 5e00.0000.8000
# Using Gathered
# Before state:
# -------------
#
# vios#show lacp sys-id
# 123, 5e00.0000.8000
- name: Gather listed LACP with provided configurations
cisco.ios.ios_lacp:
config:
state: gathered
# Module Execution Result:
# ------------------------
#
# "gathered": {
# "system": {
# "priority": 500
# }
# }
# After state:
# ------------
#
# vios#show lacp sys-id
# 123, 5e00.0000.8000
# Using Rendered
- name: Render the commands for provided configuration
cisco.ios.ios_lacp:
config:
system:
priority: 123
state: rendered
# Module Execution Result:
# ------------------------
#
# "rendered": [
# "lacp system-priority 10"
# ]
# Using Parsed
# File: parsed.cfg
# ----------------
#
# lacp system-priority 123
- name: Parse the commands for provided configuration
cisco.ios.ios_lacp:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Module Execution Result:
# ------------------------
#
# "parsed": {
# "system": {
# "priority": 123
# }
# }
Common return values are documented here, the following are the fields unique to this module:
- Sumit Jaiswal (@justjais)