From dff8d7be04bca3db69b65bb8d5e40bb2698501fe Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Thu, 7 Jun 2012 12:22:13 +0200 Subject: [PATCH] Expand vars_files identically for lists and non-lists --- lib/ansible/playbook/play.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 82fbc41d62..cd7a461867 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -186,9 +186,10 @@ class Play(object): else: - fpath = utils.path_dwim(self.playbook.basedir, utils.template(filename, self.vars)) + filename2 = utils.template(filename, self.playbook.SETUP_CACHE[host]) + filename2 = utils.template(filename2, self.vars) + fpath = utils.path_dwim(self.playbook.basedir, filename2) new_vars = utils.parse_yaml_from_file(fpath) if new_vars: self.playbook.SETUP_CACHE[host].update(new_vars) #else: could warn if vars file contains no vars. -