filter/test plugin listing, fix bug on file sorting (#79591)

* filter/test plugin listing, fix bug on file sorting

avoid legacy/builtin special casing for 'all'
pull/79608/head
Brian Coca 2 years ago committed by GitHub
parent f6c0e22f98
commit b7e948e623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- ansible-doc now will correctly display short descriptions on listing filters/tests no matter the directory sorting.

@ -112,9 +112,6 @@ def _list_plugins_from_paths(ptype, dirs, collection, depth=0):
def _list_j2_plugins_from_file(collection, plugin_path, ptype, plugin_name):
ploader = getattr(loader, '{0}_loader'.format(ptype))
if collection in ('ansible.builtin', 'ansible.legacy'):
file_plugins = ploader.all()
else:
file_plugins = ploader.get_contained_plugins(collection, plugin_path, plugin_name)
return file_plugins

Loading…
Cancel
Save