Save the included directory for playbook includes for use as the basedir

Fixes #12524
This commit is contained in:
James Cammarata 2015-09-29 00:25:59 -04:00
parent 4226e49bc6
commit ffdba96668
3 changed files with 9 additions and 0 deletions

View file

@ -83,6 +83,9 @@ class PlaybookExecutor:
self._display.vv('%d plays in %s' % (len(plays), playbook_path))
for play in plays:
if play._included_path is not None:
self._loader.set_basedir(play._included_path)
# clear any filters which may have been applied to the inventory
self._inventory.remove_restriction()