diff --git a/lib/ansible/playbook/conditional.py b/lib/ansible/playbook/conditional.py index 0efe9f4a76f..e0c426df3be 100644 --- a/lib/ansible/playbook/conditional.py +++ b/lib/ansible/playbook/conditional.py @@ -125,9 +125,9 @@ class Conditional: # variable was undefined. If we happened to be # looking for an undefined variable, return True, # otherwise fail - if "is undefined" in original: + if "is undefined" in original or "is not defined" in original or "not is defined" in original: return True - elif "is defined" in original: + elif "is defined" in original or "is not undefined" in original or "not is undefined" in original: return False else: raise AnsibleUndefinedVariable("error while evaluating conditional (%s): %s" % (original, e))