diff --git a/plugins/modules/dcnm_inventory.py b/plugins/modules/dcnm_inventory.py index 13e552c9d..1f5e3d046 100644 --- a/plugins/modules/dcnm_inventory.py +++ b/plugins/modules/dcnm_inventory.py @@ -872,7 +872,7 @@ def have_in_want(have_c): if have_c["switches"][0]["ipaddr"] == want_c["switches"][0]["ipaddr"]: match = re.search(r"\S+\((\S+)\)", have_c["switches"][0]["deviceIndex"]) if match is None: - return match_found + continue want_serial_num = match.groups()[0] if have_c["switches"][0]["serialNumber"] == want_serial_num: if (