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

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

avoid legacy/builtin special casing for 'all'

(cherry picked from commit b7e948e623)
pull/79770/head
Brian Coca 2 years ago committed by GitHub
parent 165557df11
commit cde91027e8
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