mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-03 01:03:09 +00:00
Don't inject PlayContext properties as variables if they're None
Fixes bug introduced in 078ebb0
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user