From a88c59f4513d92ae608e96e60c1e391d1c4a25a2 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Sat, 17 Oct 2015 12:44:28 -0400 Subject: [PATCH] Reset basedir for plays that are not from a PlaybookInclude Fixes #12524 (again) --- lib/ansible/executor/playbook_executor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py index cbea7050f79..e7a8c0f6606 100644 --- a/lib/ansible/executor/playbook_executor.py +++ b/lib/ansible/executor/playbook_executor.py @@ -86,6 +86,8 @@ class PlaybookExecutor: for play in plays: if play._included_path is not None: self._loader.set_basedir(play._included_path) + else: + self._loader.set_basedir(pb._basedir) # clear any filters which may have been applied to the inventory self._inventory.remove_restriction()