mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
ensure fullpaths on vars files (#24990)
fixes #24970 now correctly picks up group/host vars inside group/host named directories
This commit is contained in:
committed by
Adrian Likins
parent
0d761e4568
commit
40b222867f
@@ -99,10 +99,11 @@ class VarsModule(BaseVarsPlugin):
|
||||
if os.path.isdir(full_path):
|
||||
# matched dir name, so use all files included recursively
|
||||
for spath in os.listdir(full_path):
|
||||
if os.path.isdir(spath):
|
||||
found.extend(self._find_vars_files(spath, name))
|
||||
full_spath = os.path.join(full_path, spath)
|
||||
if os.path.isdir(full_spath):
|
||||
found.extend(self._find_vars_files(full_spath, ''))
|
||||
else:
|
||||
found.append(spath)
|
||||
found.append(full_spath)
|
||||
else:
|
||||
found.append(full_path)
|
||||
return found
|
||||
|
||||
Reference in New Issue
Block a user