Unexpected Output with ansible-doc -t <type> -j --metadata-dump #2309
Labels
needs_triage
Needs a first human triage before being processed.
new_contributor
This PR is the first contribution by a new community member.
Description
I am experiencing an issue with the command:
ansible-doc -t <type> -j --metadata-dump
When I run this command with any specified type, the output always includes the complete metadata for all types, rather than just the metadata related to the specified type. This behavior occurs for every type and prevents me from obtaining only the relevant metadata for the specified type.
Steps to Reproduce
Run the following command with any type (e.g.,
keyword
,become
, etc.):ansible-doc -t -j --metadata-dump
Observe that the output contains the complete metadata for all types, not just the metadata for the specified type.
Expected Output
The command should return only the metadata for the specified type in JSON format.
For example, running
ansible-doc -t keyword -j --metadata-dump
should return only the metadata related tokeyword
, such as:Actual Output
The output always includes the complete metadata for all types, regardless of the specified type.
For example, running
ansible-doc -t keyword -j --metadata-dump
outputs the following:Environment
ansible-doc [core 2.18.1]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.11/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible-doc
python version = 3.11.11 (main, Dec 4 2024, 20:38:25) [GCC 12.2.0] (/usr/local/bin/python3.11)
jinja version = 3.1.4
libyaml = True
The text was updated successfully, but these errors were encountered: