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

unconditionally set vars on init to avoid issues with var precedence

This commit is contained in:
Brian Coca 2015-12-01 21:24:46 -08:00
parent c03afccc05
commit b92cb93539

View file

@ -77,9 +77,10 @@ class Base:
# and initialize the base attributes
self._initialize_base_attributes()
if self.vars is None:
# and init vars, avoid using defaults in field declaration as it lives across plays
self.vars = dict()
# The following three functions are used to programatically define data
# descriptors (aka properties) for the Attributes of all of the playbook
# objects (tasks, blocks, plays, etc).