-
Bug
-
Resolution: Done
-
Normal
-
None
-
2.4
-
None
-
Networking Sprint 17
-
Moderate
Detailed Description
When CIsco NXOS gathers facts, it runs the following:
as_number = connection.get("show running-config bgp | include 'router bgp'")
templates = connection.get("show running-config bgp | section 'template '")
This ends up returning an invalid command error when bgp is disabled on the device. Customer has worked around the issue by changing the code to:
as_number = connection.get("show running-config | include 'router bgp'")
templates = connection.get("show running-config | section 'template peer '")
The gather facts should be smart enough to not gather facts on things that are disabled.
Component Versions:
ansible-core: v2.15.8
cisco.nxos: v9.1.0
python: v3.9.6
Steps to Reproduce
Disable bgp on a cisco device and gather facts.
Actual Behavior
Gather facts return invalid command errors from device
Expected Behavior
Gather Facts should not try gathering facts for a disabled feature.