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
Permit to have a action plugin without a empty module file #18208
Conversation
|
they should really have module file as it is only way to document the plugin |
|
@bcoca so we need to have an empty module file with just the DOCUMENTATION and EXAMPLE strings? |
|
For a external plugin, yeah. For a private one, that seems rather counter intuitive. |
|
ansible-doc still works with private plugins, its a nice way for them to give docs to users that didn't write them or forgot what they did 3 months ago and what the options mean. |
|
It requires an extra configuration step, though. That means you do not only need to specify an action_plugins path but also a library path. A bit awkward IMO. Would it not be possible to embed the doc directly in the action module ? Is there a limitation ? Sorry if I sound naive, I'm not familiar with this bit of code. Genuine question. |
|
It is possible, here is a fix, so now, if we have a action plugin, ansible-doc will also be able to get doc from the plugin. (code could surely be refactored a bit, but just to see if we agree on the basics) |
|
CI is failing nearly all test jobs with the error: Full logs for one of the failed jobs here: https://app.shippable.com/runs/58926c7bf2e87f0f00908e8e/7/console |
Currently, someone writing a action plugin will also need to have a empty file in the module path to avoid triggering the error "no action detected in task.".
|
Rebased this myself and merged in 4811c7f. Thanks! |
The "modules" directory from plugins had already been removed. This is no longer required since Ansible made it optional to have a module for an action plugin [1]. [1]: ansible/ansible#18208 Change-Id: Idd75ece28d10e1ec81c1752e599fd5d8d2826198
ISSUE TYPE
COMPONENT NAME
ansible
SUMMARY
Currently, someone writing a action plugin will also need
to have a empty file in the module path to avoid triggering
the error "no action detected in task.".
This PR verify that either a module or a action plugin correspond to a task, permitting to action plugin without a empty file (in case that's purely a action plugin controller side)
( cc @dmsimard )