From 346a9fe87df6175bc98835242337330af3625782 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 1 Dec 2015 21:24:46 -0800 Subject: [PATCH] unconditionally set vars on init to avoid issues with var precedence --- lib/ansible/playbook/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/playbook/base.py b/lib/ansible/playbook/base.py index 914bdb4d911..4ca8e4e463a 100644 --- a/lib/ansible/playbook/base.py +++ b/lib/ansible/playbook/base.py @@ -77,8 +77,9 @@ class Base: # and initialize the base attributes self._initialize_base_attributes() - if self.vars is None: - self.vars = dict() + # 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