mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Modules is a package.
This commit is contained in:
parent
9249d1db28
commit
25cc79e2db
2 changed files with 8 additions and 1 deletions
0
lib/ansible/modules/__init__.py
Normal file
0
lib/ansible/modules/__init__.py
Normal file
|
@ -101,7 +101,14 @@ class PluginLoader(object):
|
|||
for basedir in _basedirs:
|
||||
fullpath = os.path.realpath(os.path.join(basedir, self.subdir))
|
||||
if os.path.isdir(fullpath):
|
||||
|
||||
files = glob.glob("%s/*" % fullpath)
|
||||
|
||||
# allow directories to be two levels deep
|
||||
files2 = glob.glob("%s/*/*" % fullpath)
|
||||
|
||||
files = files.extend(files2)
|
||||
|
||||
for file in files:
|
||||
if os.path.isdir(file) and file not in ret:
|
||||
ret.append(file)
|
||||
|
@ -232,7 +239,7 @@ shell_loader = PluginLoader(
|
|||
|
||||
module_finder = PluginLoader(
|
||||
'',
|
||||
'',
|
||||
'ansible.modules',
|
||||
C.DEFAULT_MODULE_PATH,
|
||||
'library'
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue