• AnsibleFest
  • Products
  • Community
  • Webinars & Training
  • Blog
Ansible Logo
Documentation
Ansible
2.9

Installation, Upgrade & Configuration

  • Installation Guide
  • Ansible Porting Guides

Using Ansible

  • User Guide

Contributing to Ansible

  • Ansible Community Guide

Extending Ansible

  • Developer Guide

Common Ansible Scenarios

  • Public Cloud Guides
  • Network Technology Guides
  • Virtualization and Containerization Guides

Ansible for Network Automation

  • Ansible for Network Automation

Ansible Galaxy

  • Galaxy User Guide
  • Galaxy Developer Guide

Reference & Appendices

  • Module Index
  • Playbook Keywords
  • Return Values
  • Ansible Configuration Settings
  • Controlling how Ansible behaves: precedence rules
  • YAML Syntax
  • Python 3 Support
  • Interpreter Discovery
  • Release and maintenance
  • Testing Strategies
  • Sanity Tests
  • Frequently Asked Questions
  • Glossary
  • Ansible Reference: Module Utilities
  • Special Variables
  • Red Hat Ansible Tower
  • Logging Ansible output

Roadmaps

  • Ansible Roadmap




Ansible
  • Docs »
  • junos_lldp_interfaces – Manage link layer discovery protocol (LLDP) attributes of interfaces on Juniper JUNOS devices


For community users, you are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible community documentation . For Red Hat customers, see the Red Hat AAP platform lifecycle.

junos_lldp_interfaces – Manage link layer discovery protocol (LLDP) attributes of interfaces on Juniper JUNOS devices¶

New in version 2.9.

  • Synopsis

  • Parameters

  • Examples

  • Return Values

  • Status

Synopsis¶

  • This module manages link layer discovery protocol (LLDP) attributes of interfaces on Juniper JUNOS devices.

Parameters¶

Parameter Choices/Defaults Comments
config
list / elements=dictionary
The list of link layer discovery protocol interface attribute configurations
enabled
boolean
    Choices:
  • no
  • yes
This is a boolean value to control disabling of LLDP on the interface name
name
string / required
Name of the interface LLDP needs to be configured on.
state
string
    Choices:
  • merged ←
  • replaced
  • overridden
  • deleted
The state of the configuration after module completion.

Examples¶

# Using merged
# Before state:
# -------------
# user@junos01# # show protocols lldp
# management-address 10.1.1.1;
# advertisement-interval 10000;

- name: Merge provided configuration with device configuration
  junos_lldp_interfaces:
    config:
      - name: ge-0/0/1
      - name: ge-0/0/2
        enabled: False
    state: merged

# After state:
# -------------
# user@junos01# show protocols lldp
# management-address 10.1.1.1;
# advertisement-interval 10000;
# interface ge-0/0/1;
# interface ge-0/0/2 {
#     disable;
# }

# Using replaced
# Before state:
# -------------
# user@junos01# show protocols lldp
# management-address 10.1.1.1;
# advertisement-interval 10000;
# interface ge-0/0/1;
# interface ge-0/0/2 {
#     disable;
# }

- name: Replace provided configuration with device configuration
  junos_lldp_interfaces:
    config:
      - name: ge-0/0/2
        disable: False
      - name: ge-0/0/3
        enabled: False
    state: replaced

# After state:
# -------------
# user@junos01# show protocols lldp
# management-address 10.1.1.1;
# advertisement-interval 10000;
# interface ge-0/0/1;
# interface ge-0/0/2;
# interface ge-0/0/3 {
#     disable;
# }

# Using overridden
# Before state:
# -------------
# user@junos01# show protocols lldp
# management-address 10.1.1.1;
# advertisement-interval 10000;
# interface ge-0/0/1;
# interface ge-0/0/2 {
#     disable;
# }

- name: Override provided configuration with device configuration
  junos_lldp_interfaces:
    config:
      - name: ge-0/0/2
        enabled: False
    state: overridden

# After state:
# -------------
# user@junos01# show protocols lldp
# management-address 10.1.1.1;
# advertisement-interval 10000;
# interface ge-0/0/2 {
#     disable;
# }

# Using deleted
# Before state:
# -------------
# user@junos01# show protocols lldp
# management-address 10.1.1.1;
# advertisement-interval 10000;
# interface ge-0/0/1;
# interface ge-0/0/2;
# interface ge-0/0/3 {
#     disable;
# }
- name: Delete lldp interface configuration (this will not delete other lldp configuration)
  junos_lldp_interfaces:
    config:
    - name: ge-0/0/1
    - name: ge-0/0/3
    state: deleted

# After state:
# -------------
# user@junos01# show protocols lldp
# management-address 10.1.1.1;
# advertisement-interval 10000;
# interface ge-0/0/2;
# interface ge-0/0/1;

Return Values¶

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
after
list
when changed
The configuration as structured data after module completion.

Sample:
The configuration returned will always be in the same format of the parameters above.
before
list
always
The configuration as structured data prior to module invocation.

Sample:
The configuration returned will always be in the same format of the parameters above.
commands
list
always
The set of commands pushed to the remote device.

Sample:
['xml 1', 'xml 2', 'xml 3']


Status¶

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by the Ansible Network Team. [network]

Red Hat Support¶

More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.

Authors¶

  • Ganesh Nalawade (@ganeshrn)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.


© Copyright 2019 Red Hat, Inc. Last updated on May 27, 2022.