diff --git a/lib/ansible/modules/network/nxos/nxos_interface_ospf.py b/lib/ansible/modules/network/nxos/nxos_interface_ospf.py index 4642f7f3210..36fbf5cd282 100644 --- a/lib/ansible/modules/network/nxos/nxos_interface_ospf.py +++ b/lib/ansible/modules/network/nxos/nxos_interface_ospf.py @@ -604,6 +604,9 @@ def main(): 'message_digest_password']], supports_check_mode=True) + if not module.params['interface'].startswith('loopback'): + module.params['interface'] = module.params['interface'].capitalize() + for param in ['message_digest_encryption_type', 'message_digest_algorithm_type', 'message_digest_password']: diff --git a/lib/ansible/modules/network/nxos/nxos_vrf_interface.py b/lib/ansible/modules/network/nxos/nxos_vrf_interface.py index 1a9f96c753e..b007040102d 100644 --- a/lib/ansible/modules/network/nxos/nxos_vrf_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_vrf_interface.py @@ -385,7 +385,9 @@ def get_vrf_list(module): def get_interface_info(interface, module): - command = 'show run | section interface.{0}'.format(interface.capitalize()) + if not interface.startswith('loopback'): + interface = interface.capitalize() + command = 'show run | section interface.{0}'.format(interface) vrf_regex = ".*vrf\s+member\s+(?P\S+).*" try: