Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Output with ansible-doc -t <type> -j --metadata-dump #2309

Open
miguletztim opened this issue Dec 21, 2024 · 1 comment
Open

Unexpected Output with ansible-doc -t <type> -j --metadata-dump #2309

miguletztim opened this issue Dec 21, 2024 · 1 comment
Labels
needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member.

Comments

@miguletztim
Copy link

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

  1. Run the following command with any type (e.g., keyword, become, etc.):
    ansible-doc -t -j --metadata-dump

  2. 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 to keyword, such as:

{
  "all": {
    "accelerate": {},
    "accelerate_ipv6": {},
    "accelerate_port": {},
    "action": {},
    "always": {},
    "any_errors_fatal": {},
    "args": {},
    "async": {},
    "become": {},
    "become_exe": {},
    "become_flags": {},
    "become_method": {},
    "become_user": {},
    "block": {},
    "changed_when": {},
    "check_mode": {},
    "collections": {},
    "connection": {},
    "debugger": {},
    "delay": {},
    "delegate_facts": {},
    "delegate_to": {},
    "diff": {},
    "environment": {},
    "fact_path": {},
    "failed_when": {},
    "force_handlers": {},
    "gather_facts": {},
    "gather_subset": {},
    "gather_timeout": {},
    "handlers": {},
    "hosts": {},
    "ignore_errors": {},
    "ignore_unreachable": {},
    "loop": {},
    "loop_control": {},
    "max_fail_percentage": {},
    "module_defaults": {},
    "name": {},
    "no_log": {},
    "notify": {},
    "order": {},
    "poll": {},
    "port": {},
    "post_tasks": {},
    "pre_tasks": {},
    "register": {},
    "remote_user": {},
    "rescue": {},
    "retries": {},
    "roles": {},
    "run_once": {},
    "serial": {},
    "strategy": {},
    "tags": {},
    "tasks": {},
    "throttle": {},
    "timeout": {},
    "until": {},
    "vars": {},
    "vars_files": {},
    "vars_prompt": {},
    "when": {}
  }
}

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:

{
  "all": {
    "become": {},
    "cache": {},
    "callback": {},
    "cliconf": {},
    "connection": {},
    "filter": {},
    "inventory": {},
    "keyword": {},
    "lookup": {},
    "module": {},
    "netconf": {},
    "role": {},
    "shell": {},
    "strategy": {},
    "test": {},
    "vars": {}
  }
}

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

@ansible-documentation-bot ansible-documentation-bot bot added needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. labels Dec 21, 2024
@ansible-documentation-bot
Copy link
Contributor

Thanks for your Ansible docs contribution! We talk about Ansible documentation on Matrix at #docs:ansible.im if you ever want to join us and chat about the docs! We meet on Matrix every Tuesday. See the Ansible calendar for meeting details. We welcome additions to our weekly agenda items too. You can add the dawgs-meeting tag to a forum topic to bring it up at the next meeting.

@miguletztim miguletztim changed the title Unexpected Output with `ansible-doc -t <type> -j --metadata-dump Unexpected Output with ansible-doc -t <type> -j --metadata-dump Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member.
Projects
Status: 🆕 Triage
Development

No branches or pull requests

1 participant