diff --git a/lib/ansible/modules/network/nxos/nxos_bgp.py b/lib/ansible/modules/network/nxos/nxos_bgp.py index 8f74b621ba..3ea66095e6 100644 --- a/lib/ansible/modules/network/nxos/nxos_bgp.py +++ b/lib/ansible/modules/network/nxos/nxos_bgp.py @@ -460,7 +460,7 @@ def get_value(arg, config): def get_existing(module, args, warnings): existing = {} - netcfg = CustomNetworkConfig(indent=2, contents=get_config(module)) + netcfg = CustomNetworkConfig(indent=2, contents=get_config(module, flags=['bgp all'])) asn_re = re.compile(r'.*router\sbgp\s(?P\d+).*', re.S) asn_match = asn_re.match(str(netcfg))