1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Don't inject PlayContext properties as variables if they're None

Fixes bug introduced in 078ebb0
This commit is contained in:
James Cammarata 2016-02-23 15:07:51 -05:00
parent e02b98274b
commit da02aba173

View file

@ -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