diff --git a/lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py b/lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py index 263ab7154c..68d633563f 100644 --- a/lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py +++ b/lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py @@ -330,7 +330,7 @@ def main(): candidate = CustomNetworkConfig(indent=3) if state == 'present': state_present(module, existing, proposed, candidate) - elif state == 'absent': + elif existing and state == 'absent': state_absent(module, existing, proposed, candidate) if candidate: