made sure they all look in files/vars/template dirs also when executed in play and not only from task

This commit is contained in:
Brian Coca 2015-08-16 02:36:49 -04:00
parent 861fdfc5ba
commit 950622cebd
8 changed files with 13 additions and 9 deletions

View file

@ -36,7 +36,7 @@ class ActionModule(ActionBase):
if self._task._role:
source = self._loader.path_dwim_relative(self._task._role._role_path, 'vars', source)
else:
source = self._loader.path_dwim(source)
source = self._loader.path_dwim_relative(self._loader.get_basedir(), 'vars', source)
if os.path.exists(source):
(data, show_content) = self._loader._get_file_contents(source)