diff --git a/lib/ansible/modules/network/eos/eos_vrf.py b/lib/ansible/modules/network/eos/eos_vrf.py index 6c4406b7533..5e73ce306f1 100644 --- a/lib/ansible/modules/network/eos/eos_vrf.py +++ b/lib/ansible/modules/network/eos/eos_vrf.py @@ -237,8 +237,10 @@ def check_declarative_intent_params(want, module): for i in w['interfaces']: obj_in_have = search_obj_in_list(w['name'], have) - if obj_in_have and i not in obj_in_have.get('interfaces', []): - module.fail_json(msg="Interface %s not configured on vrf %s" % (i, w['name'])) + if obj_in_have: + interfaces = obj_in_have.get('interfaces') + if interfaces is not None and i not in interfaces: + module.fail_json(msg="Interface %s not configured on vrf %s" % (i, w['name'])) def main():