diff --git a/lib/ansible/playbook/play_context.py b/lib/ansible/playbook/play_context.py index 2ff06857f33..34b9affade6 100644 --- a/lib/ansible/playbook/play_context.py +++ b/lib/ansible/playbook/play_context.py @@ -519,7 +519,7 @@ class PlayContext(Base): var_val = getattr(self, prop) for var_opt in var_list: - if var_opt not in variables: + if var_opt not in variables and var_val is not None: variables[var_opt] = var_val except AttributeError: continue