community / community.general / 0.1.1 / module / lldp get details reported by lldp Authors: Andy Hill (@andyhky) preview | supported by communitycommunity.general.lldp (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Reads data out of lldpctl
# Retrieve switch/port information - name: Gather information from lldp lldp:
- name: Print each switch/port debug: msg: "{{ lldp[item]['chassis']['name'] }} / {{ lldp[item]['port']['ifname'] }}" with_items: "{{ lldp.keys() }}"