community.general.lldp (0.1.1) — module

get details reported by lldp

Authors: Andy Hill (@andyhky)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Reads data out of lldpctl


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Retrieve switch/port information
 - name: Gather information from lldp
   lldp:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
 - name: Print each switch/port
   debug:
    msg: "{{ lldp[item]['chassis']['name'] }} / {{ lldp[item]['port']['ifname'] }}"
   with_items: "{{ lldp.keys() }}"