From b574c700064b3762045310bdaf4d914f3e7ffe07 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 20 Jul 2012 10:00:51 -0400 Subject: [PATCH] host and group vars should update the setup cache --- lib/ansible/playbook/play.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 3306c80c801..71eafc57de1 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -213,10 +213,12 @@ class Play(object): for x in groups: path = os.path.join(basedir, "group_vars/%s" % x) if os.path.exists(path): - self.vars_files.append(path) + data = utils.parse_yaml_from_file(path) + self.playbook.SETUP_CACHE[host].update(data) path = os.path.join(basedir, "host_vars/%s" % hostrec.name) if os.path.exists(path): - self.vars_files.append(path) + data = utils.parse_yaml_from_file(path) + self.playbook.SETUP_CACHE[host].update(data) for filename in self.vars_files: