mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-07 08:54:01 -07:00
Add a base-level get_basedir method for lookup plugins and fix relative lookups
Fixes #11746
This commit is contained in:
parent
3a4dd523d3
commit
ee835ff7ad
5 changed files with 14 additions and 15 deletions
|
@ -30,15 +30,12 @@ class LookupModule(LookupBase):
|
|||
if not isinstance(terms, list):
|
||||
terms = [ terms ]
|
||||
|
||||
basedir = self.get_basedir(variables)
|
||||
|
||||
ret = []
|
||||
|
||||
templar = Templar(loader=self._loader, variables=variables)
|
||||
|
||||
if 'role_path' in variables:
|
||||
basedir = variables['role_path']
|
||||
else:
|
||||
basedir = self._loader.get_basedir()
|
||||
|
||||
for term in terms:
|
||||
self._display.debug("File lookup term: %s" % term)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue