mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Merge pull request #15208 from bcoca/constants_pathlist
centralize path list handling
This commit is contained in:
@@ -123,7 +123,8 @@ class ActionModule(ActionBase):
|
||||
# loader, so that it knows about the other paths to find template files
|
||||
searchpath = [self._loader._basedir, os.path.dirname(source)]
|
||||
if self._task._role is not None:
|
||||
searchpath.insert(1, C.DEFAULT_ROLES_PATH)
|
||||
if C.DEFAULT_ROLES_PATH:
|
||||
searchpath[:0] = C.DEFAULT_ROLES_PATH
|
||||
searchpath.insert(1, self._task._role._role_path)
|
||||
|
||||
self._templar.environment.loader.searchpath = searchpath
|
||||
|
||||
Reference in New Issue
Block a user