mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 01:33:09 +00:00
fixes exception raised when nxos_facts uses nxapi transport (#4988)
This fixes a condition where an exception is raised when collecting `interface` facts and the transport is set to nxapi in the nxos_nxapi module. fixes ansible/ansible#17691
This commit is contained in:
committed by
Matt Clay
parent
27759ee58f
commit
654a38897f
@@ -276,11 +276,11 @@ class Interfaces(FactsBase):
|
||||
def commands(self):
|
||||
add_command(self.runner, 'show interface', output='json')
|
||||
|
||||
resp = self.module.cli(['show ipv6 interface | wc lines'])
|
||||
if int(resp[0]) > 1:
|
||||
try:
|
||||
self.module.cli('show ipv6 interface', 'json')
|
||||
add_command(self.runner, 'show ipv6 interface', output='json')
|
||||
self.ipv6 = True
|
||||
else:
|
||||
except NetworkError:
|
||||
self.ipv6 = False
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user