ansible.builtin.net_lldp_interface (v2.8.19) — module

Manage LLDP interfaces configuration on network devices

| "added in version" 2.4 of ansible.builtin"

Authors: Ganesh Nalawade (@ganeshrn)

preview | supported by network

Install Ansible via pip

Install with pip install ansible==2.8.19

Description

This module provides declarative management of LLDP interfaces configuration on network devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure LLDP on specific interfaces
  net_lldp_interface:
    name: eth1
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Disable LLDP on specific interfaces
  net_lldp_interface:
    name: eth1
    state: disabled
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Enable LLDP on specific interfaces
  net_lldp_interface:
    name: eth1
    state: enabled
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete LLDP on specific interfaces
  net_lldp_interface:
    name: eth1
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create aggregate of LLDP interface configurations
  net_lldp_interface:
    aggregate:
    - { name: eth1 }
    - { name: eth2 }
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete aggregate of LLDP interface configurations
  net_lldp_interface:
    aggregate:
    - { name: eth1 }
    - { name: eth2 }
    state: absent

Inputs

    
name:
    description:
    - Name of the interface LLDP should be configured on.

purge:
    default: false
    description:
    - Purge interfaces not defined in the aggregate parameter.

state:
    choices:
    - present
    - absent
    - enabled
    - disabled
    default: present
    description:
    - State of the LLDP configuration.

aggregate:
    description: List of interfaces LLDP should be configured on.

Outputs

commands:
  description: The list of configuration mode commands to send to the device
  returned: always, except for the platforms that use Netconf transport to manage
    the device.
  sample:
  - set service lldp eth1 disable
  type: list