cisco.ios.ios_lldp_global – LLDP resource module¶
Note
This plugin is part of the cisco.ios collection (version 1.3.0).
To install it use: ansible-galaxy collection install cisco.ios
.
To use it in a playbook, specify: cisco.ios.ios_lldp_global
.
New in version 1.0.0: of cisco.ios
Synopsis¶
This module configures and manages the Link Layer Discovery Protocol(LLDP) attributes on IOS platforms.
Note
This module has a corresponding action plugin.
Parameters¶
Examples¶
# Using merged
# Before state:
# -------------
# vios#sh running-config | section ^lldp
# vios1#
- name: Merge provided configuration with device configuration
cisco.ios.ios_lldp_global:
config:
holdtime: 10
enabled: true
reinit: 3
timer: 10
state: merged
# After state:
# ------------
# vios#sh running-config | section ^lldp
# lldp timer 10
# lldp holdtime 10
# lldp reinit 3
# lldp run
# Using replaced
# Before state:
# -------------
# vios#sh running-config | section ^lldp
# lldp timer 10
# lldp holdtime 10
# lldp reinit 3
# lldp run
- name: Replaces LLDP device configuration with provided configuration
cisco.ios.ios_lldp_global:
config:
holdtime: 20
reinit: 5
state: replaced
# After state:
# -------------
# vios#sh running-config | section ^lldp
# lldp holdtime 20
# lldp reinit 5
# Using Deleted without any config passed
#"(NOTE: This will delete all of configured LLDP module attributes)"
# Before state:
# -------------
# vios#sh running-config | section ^lldp
# lldp timer 10
# lldp holdtime 10
# lldp reinit 3
# lldp run
- name: Delete LLDP attributes
cisco.ios.ios_lldp_global:
state: deleted
# After state:
# -------------
# vios#sh running-config | section ^lldp
# vios1#
# Using Gathered
# Before state:
# -------------
#
# vios#sh running-config | section ^lldp
# lldp timer 10
# lldp holdtime 10
# lldp reinit 3
# lldp run
- name: Gather listed interfaces with provided configurations
cisco.ios.ios_lldp_global:
config:
state: gathered
# Module Execution Result:
# ------------------------
#
# "gathered": {
# "enabled": true,
# "holdtime": 10,
# "reinit": 3,
# "timer": 10
# }
# After state:
# ------------
#
# vios#sh running-config | section ^lldp
# lldp timer 10
# lldp holdtime 10
# lldp reinit 3
# lldp run
# Using Rendered
- name: Render the commands for provided configuration
cisco.ios.ios_lldp_global:
config:
holdtime: 10
enabled: true
reinit: 3
timer: 10
state: rendered
# Module Execution Result:
# ------------------------
#
# "rendered": [
# "lldp holdtime 10",
# "lldp run",
# "lldp timer 10",
# "lldp reinit 3"
# ]
# Using Parsed
# File: parsed.cfg
# ----------------
#
# lldp timer 10
# lldp holdtime 10
# lldp reinit 3
# lldp run
- name: Parse the commands for provided configuration
cisco.ios.ios_lldp_global:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Module Execution Result:
# ------------------------
#
# "parsed": {
# "enabled": true,
# "holdtime": 10,
# "reinit": 3,
# "timer": 10
# }
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Sumit Jaiswal (@justjais)