Commit 12d5b75a by James Cammarata

Template play vars after reading them

Fixes #9242
parent 05644686
...@@ -84,6 +84,11 @@ class Play(object): ...@@ -84,6 +84,11 @@ class Play(object):
if self.playbook.inventory.src() is not None: if self.playbook.inventory.src() is not None:
self.vars['inventory_file'] = self.playbook.inventory.src() self.vars['inventory_file'] = self.playbook.inventory.src()
# template the play vars with themselves and the extra vars
# from the playbook, to make sure they're correct
all_vars = utils.combine_vars(self.vars, self.playbook.extra_vars)
self.vars = template(basedir, self.vars, all_vars)
# We first load the vars files from the datastructure # We first load the vars files from the datastructure
# so we have the default variables to pass into the roles # so we have the default variables to pass into the roles
self.vars_files = ds.get('vars_files', []) self.vars_files = ds.get('vars_files', [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment