I would like to filter the neighbors to only show switches and routers
Playbooks, examples, etc will help in getting an answer with so little context
With this playbook it shows the ports and the neighbors connected by cdp or lldp (sw, routers, telephones, aps …). I would like it to only show sw and routers.
tasks:
-
name: GATHER FACTS FOR IOS IN A TASK
ios_facts: -
name: VIEW ALL ANSIBLE FACT KEYS
debug:
var: ansible_facts.keys() -
name: View HOSTNAME
debug:
var: ansible_net_hostname -
name: View Neighbors
debug:
var: ansible_net_neighbors