Support nested modules with ANSIBLE_LIBRARY env var

From v1: 4c2d06d2fe
This commit is contained in:
Toshio Kuratomi 2015-02-18 08:07:57 -08:00
parent cf82e57379
commit 55e26db290

View file

@ -131,7 +131,7 @@ class PluginLoader:
configured_paths = self.config.split(os.pathsep)
for path in configured_paths:
path = os.path.realpath(os.path.expanduser(path))
contents = glob.glob("%s/*" % path)
contents = glob.glob("%s/*" % path) + glob.glob("%s/*/*" % path)
for c in contents:
if os.path.isdir(c) and c not in ret:
ret.append(c)