mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
ios_facts: Add check to skip lldp neighbors if lldp doesn't exist or isn't enabled. (#40109)
* Add check to skip lldp neighbors if lldp doesn't exist or isn't enabled. * Re-enable check_rc on ios' run_commands
This commit is contained in:
committed by
Nathaniel Case
parent
465114958e
commit
39bed45baf
@@ -281,7 +281,9 @@ class Interfaces(FactsBase):
|
||||
self.populate_ipv6_interfaces(data)
|
||||
|
||||
data = self.responses[3]
|
||||
if data:
|
||||
lldp_errs = ['Invalid input', 'LLDP is not enabled']
|
||||
|
||||
if data and not any(err in data for err in lldp_errs):
|
||||
neighbors = self.run(['show lldp neighbors detail'])
|
||||
if neighbors:
|
||||
self.facts['neighbors'] = self.parse_neighbors(neighbors[0])
|
||||
|
||||
Reference in New Issue
Block a user