mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 04:49:09 -07:00
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:
parent
861fdfc5ba
commit
950622cebd
8 changed files with 13 additions and 9 deletions
|
@ -31,7 +31,12 @@ class ActionModule(ActionBase):
|
|||
def _get_absolute_path(self, path):
|
||||
if self._task._role is not None:
|
||||
original_path = path
|
||||
path = self._loader.path_dwim_relative(self._task._role._role_path, 'files', path)
|
||||
|
||||
if self._task._role is not None:
|
||||
path = self._loader.path_dwim_relative(self._task._role._role_path, 'files', path)
|
||||
else:
|
||||
path = self._loader.path_dwim_relative(self._loader.get_basedir(), 'files', path)
|
||||
|
||||
if original_path and original_path[-1] == '/' and path[-1] != '/':
|
||||
# make sure the dwim'd path ends in a trailing "/"
|
||||
# if the original path did
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue