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
pull/9451/head
Brian Coca 10 years ago
parent 7ea84d7499
commit b3b356480d

@ -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):

Loading…
Cancel
Save