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

Prefer categorized modules to uncategorized, such that if someone does an install on top of old content

the categorized modules will win over the 1.1 uncategorized modules, as the packages may not automatically
clean up the old content.
This commit is contained in:
Michael DeHaan 2013-05-19 20:09:44 -04:00
parent cd57d59913
commit 753ebea186

View file

@ -108,11 +108,11 @@ class PluginLoader(object):
# look in any configured plugin paths, allow one level deep for subcategories
configured_paths = self.config.split(os.pathsep)
for path in configured_paths:
ret.append(path)
contents = glob.glob("%s/*" % path)
for c in contents:
if os.path.isdir(c):
ret.append(c)
ret.append(path)
# look for any plugins installed in the package subtree
ret.extend(self._get_package_paths())