Enabled the use of extra vars in playbook file paths when including playbooks from other playbooks.

This commit is contained in:
Tin Tvrtkovic 2013-07-18 22:45:18 +02:00
parent c3a8b6ff07
commit 4a732c1e9f
3 changed files with 29 additions and 2 deletions

View file

@ -130,7 +130,7 @@ class PlayBook(object):
self.basedir = os.path.dirname(playbook) or '.'
utils.plugins.push_basedir(self.basedir)
vars = {}
vars = extra_vars.copy()
if self.inventory.basedir() is not None:
vars['inventory_dir'] = self.inventory.basedir()
self.filename = playbook