1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

correctly adds searchpath as list

This commit is contained in:
Brian Coca 2016-04-01 18:05:46 -04:00
parent 441fe44569
commit 0bd6f3a5e8

View file

@ -51,7 +51,8 @@ class LookupModule(LookupBase):
searchpath = [self._loader._basedir, os.path.dirname(lookupfile)] searchpath = [self._loader._basedir, os.path.dirname(lookupfile)]
if 'role_path' in variables: if 'role_path' in variables:
searchpath.insert(1, C.DEFAULT_ROLES_PATH) if C.DEFAULT_ROLES_PATH:
searchpath[:0] = C.DEFAULT_ROLES_PATH
searchpath.insert(1, variables['role_path']) searchpath.insert(1, variables['role_path'])
self._templar.environment.loader.searchpath = searchpath self._templar.environment.loader.searchpath = searchpath