cisco.nxos.nxos_lldp_global module – LLDP resource module
Note
This module is part of the cisco.nxos collection (version 9.2.1).
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 cisco.nxos
.
To use it in a playbook, specify: cisco.nxos.nxos_lldp_global
.
New in cisco.nxos 1.0.0
Synopsis
This module configures and manages the Link Layer Discovery Protocol(LLDP) attributes on NX-OS platforms.
Aliases: lldp_global
Parameters
Parameter |
Comments |
---|---|
A list of link layer discovery configurations |
|
Amount of time the receiving device should hold the information (in seconds) |
|
This attribute defines if the interface names should be advertised in the long(0) or short(1) form. Choices:
|
|
Amount of time to delay the initialization of LLDP on any interface (in seconds) |
|
Frequency at which LLDP updates need to be transmitted (in seconds) |
|
This attribute can be used to specify the TLVs that need to be sent and received in the LLDP packets. By default, all TLVs are advertised |
|
Used to specify the Data Center Bridging Exchange Protocol TLV Choices:
|
|
Used to specify the management address in TLV messages |
|
Management address with TLV v4 Choices:
|
|
Management address with TLV v6 Choices:
|
|
Used to manage port based attributes in TLV messages |
|
Used to specify the port description TLV Choices:
|
|
Used to specify the port VLAN ID TLV Choices:
|
|
Used to specify IEEE 802.3 DTE Power via MDI TLV Choices:
|
|
Used to manage system based attributes in TLV messages |
|
Used to specify the system capabilities TLV Choices:
|
|
Used to specify the system description TLV Choices:
|
|
Used to specify the system name TLV Choices:
|
|
This option is used only with state parsed. The value of this option should be the output received from the NX-OS device by executing the command show running-config | include lldp. The state parsed reads the configuration from |
|
The state of the configuration after module completion. States Choices:
|
Notes
Note
Tested against NxOS 7.3.(0)D1(1) on VIRL
Unsupported for Cisco MDS
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: true
power_management: true
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:
Key |
Description |
---|---|
The configuration as structured data after module completion. Returned: when changed Sample: |
|
The configuration as structured data prior to module invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |