Commit b3b35648 by Brian Coca

added the ability to keep aliased and deprecated modules prefixed with

'_', they will be loaded after non prefixed modules are checked they can
be full modules or symlinks to existing ones (alias)

also updated ansible doc to ignore these, will eventually add selective
display
parent 7ea84d74
......@@ -225,11 +225,13 @@ def main():
# list all modules
paths = utils.plugins.module_finder._get_paths()
module_list = []
deprecated_list = []
module_aliases = {}
for path in paths:
# os.system("ls -C %s" % (path))
if os.path.isdir(path):
for module in os.listdir(path):
if any(module.endswith(x) for x in BLACKLIST_EXTS):
if module.startswith('_') or any(module.endswith(x) for x in BLACKLIST_EXTS):
continue
module_list.append(module)
......
......@@ -178,6 +178,9 @@ class PluginLoader(object):
self._plugin_path_cache[full_name] = path
return path
if not name.startswith('_'):
return self.find_plugin('_' + name, suffixes, transport)
return None
def has_plugin(self, name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment