From da02aba173d49eabc890a1e3fbd2765ad69e9de3 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Tue, 23 Feb 2016 15:07:51 -0500 Subject: [PATCH] Don't inject PlayContext properties as variables if they're None Fixes bug introduced in 078ebb0 --- lib/ansible/playbook/play_context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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