diff --git a/changelogs/fragments/adoc_fix_list.yml b/changelogs/fragments/adoc_fix_list.yml new file mode 100644 index 00000000000..b0009cd02d1 --- /dev/null +++ b/changelogs/fragments/adoc_fix_list.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-doc now will correctly display short descriptions on listing filters/tests no matter the directory sorting. diff --git a/lib/ansible/plugins/list.py b/lib/ansible/plugins/list.py index 075225f8410..e09b293feaf 100644 --- a/lib/ansible/plugins/list.py +++ b/lib/ansible/plugins/list.py @@ -112,10 +112,7 @@ 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) + file_plugins = ploader.get_contained_plugins(collection, plugin_path, plugin_name) return file_plugins