ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
814 stars 1.49k forks source link

Where can I see module entire action list? #8615

Open geeteq opened 2 months ago

geeteq commented 2 months ago

Summary

In https://docs.ansible.com/ansible/latest/collections/community/general/redfish_command_module.html

Where can I see the list of categories and commands available?

Issue Type

Bug Report

Component Name

redfish_command

Ansible Version

$ ansible --version

2.11

Community.general Version

$ ansible-galaxy collection list community.general

xx

Configuration

$ ansible-config dump --only-changed

xx

OS / Environment

RHEL9

Steps to Reproduce

xx

Expected Results

xx

Actual Results

xx

Code of Conduct

ansibullbot commented 2 months ago

Files identified in the description: None

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

bcoca commented 2 months ago

for anything installed in your system https://docs.ansible.com/ansible/latest/cli/ansible-doc.html

for example, to list all modules: ansible-doc -l -t module

to see the modules for a specific collection: ansible-doc -l -t module community.general

To see other plugin types, just change what you give -t, here i list all installed inventory plugins: ansible-doc -l -t inventory

You can also just get docs about a specific plugin: ansible-doc -t inventory ansible.builtin.constructed

But when a module has things that depend on an external system, they normally don't list all possible API calls or commands, you normally need to check that API or system for possible commands.

For example, the shell module has a command field, but that translates to every possible command installed on a server, not something you can list.

felixfontein commented 2 months ago

!component =plugins/modules/redfish_command.py

ansibullbot commented 2 months ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 2 months ago

cc @TSKushal @bhavya06 @jyundt @mraineri @rajeevkallur @renxulei @tomasg2012 @xmadsen click here for bot help

felixfontein commented 2 months ago

One way to see the possible commands are in the module's source: https://github.com/ansible-collections/community.general/blob/main/plugins/modules/redfish_command.py#L806-L820

I think they are all (or almost all?) listed in the examples as well, you can use the examples to see how to use every command.