cisco.nxos.nxos_lldp_global – LLDP 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_lldp_global
.
New in version 1.0.0: of cisco.nxos
Synopsis¶
This module configures and manages the Link Layer Discovery Protocol(LLDP) attributes on NX-OS platforms.
Note
This module has a corresponding action plugin.
Parameters¶
Notes¶
Note
Tested against NxOS 7.3.(0)D1(1) on VIRL
The LLDP feature needs to be enabled before using this module
Examples¶
# Using merged
# Before state:
# -------------
#
# user(config)# show running-config | include lldp
# feature lldp
- name: Merge provided configuration with device configuration
cisco.nxos.nxos_lldp_global:
config:
timer: 35
holdtime: 100
state: merged
# After state:
# ------------
#
# user(config)# show running-config | include lldp
# feature lldp
# lldp timer 35
# lldp holdtime 100
# Using replaced
# Before state:
# -------------
#
# user(config)# show running-config | include lldp
# feature lldp
# lldp holdtime 100
# lldp reinit 5
# lldp timer 35
- name: Replace device configuration of specific LLDP attributes with provided configuration
cisco.nxos.nxos_lldp_global:
config:
timer: 40
tlv_select:
system:
description: true
name: false
management_address:
v4: true
state: replaced
# After state:
# ------------
#
# user(config)# show running-config | include lldp
# feature lldp
# lldp timer 40
# no lldp tlv-select system-name
# Using deleted
# Before state:
# -------------
#
# user(config)# show running-config | include lldp
# feature lldp
# lldp holdtime 5
# lldp reinit 3
- name: Delete LLDP configuration (this will by default remove all lldp configuration)
cisco.nxos.nxos_lldp_global:
state: deleted
# After state:
# ------------
#
# user(config)# show running-config | include lldp
# feature lldp
# Using rendered
- name: Use rendered state to convert task input to device specific commands
cisco.nxos.nxos_lldp_global:
config:
holdtime: 130
port_id: 1
reinit: 5
tlv_select:
dcbxp: yes
power_management: yes
state: rendered
# Task Output (redacted)
# -----------------------
# rendered:
# - "lldp tlv-select dcbxp"
# - "lldp tlv-select power-management"
# - "lldp portid-subtype 1"
# - "lldp reinit 5"
# - "lldp holdtime 130"
# Using parsed
# parsed.cfg
# ------------
# lldp holdtime 131
# lldp reinit 7
# no lldp tlv-select system-name
# no lldp tlv-select system-description
# Task output (redacted)
# -----------------------
# parsed:
# holdtime: 131
# reinit: 7
# tlv_select:
# system:
# description: false
# name: false
# Using gathered
# Existing device config state
# -------------------------------
# feature lldp
# lldp holdtime 129
# lldp reinit 5
# lldp timer 35
# no lldp tlv-select system-name
# Task output (redacted)
# -----------------------
# gathered:
# reinit: 5
# timer: 35
# tlv_select:
# system:
# name: False
# holdtime: 129
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Adharsh Srivats Rangarajan (@adharshsrivatsr)