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

Permit to have a action plugin without a empty module file #18208

Closed
wants to merge 1 commit into from

Conversation

mscherer
Copy link
Contributor

@mscherer mscherer commented Oct 26, 2016

ISSUE TYPE
  • Feature Pull Request
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 )

@bcoca
Copy link
Member

bcoca commented Oct 26, 2016

they should really have module file as it is only way to document the plugin

@dmsimard
Copy link
Contributor

dmsimard commented Oct 26, 2016

@bcoca so we need to have an empty module file with just the DOCUMENTATION and EXAMPLE strings?

@mscherer
Copy link
Contributor Author

mscherer commented Oct 26, 2016

For a external plugin, yeah. For a private one, that seems rather counter intuitive.

@bcoca
Copy link
Member

bcoca commented Oct 26, 2016

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.

@dmsimard
Copy link
Contributor

dmsimard commented Oct 26, 2016

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.

@mscherer
Copy link
Contributor Author

mscherer commented Oct 26, 2016

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)

@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Dec 13, 2016
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Dec 28, 2016
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jan 3, 2017
@mattclay
Copy link
Member

mattclay commented Feb 2, 2017

CI is failing nearly all test jobs with the error:

2017-02-01 23:47:13 ERROR! conflicting action statements

Full logs for one of the failed jobs here: https://app.shippable.com/runs/58926c7bf2e87f0f00908e8e/7/console

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Feb 2, 2017
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Apr 11, 2017
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.".
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 24, 2017
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jun 24, 2017
@calfonso calfonso closed this Jul 25, 2017
@calfonso calfonso reopened this Jul 25, 2017
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 25, 2017
@jimi-c
Copy link
Member

jimi-c commented Jul 25, 2017

Rebased this myself and merged in 4811c7f.

Thanks!

@jimi-c jimi-c closed this Jul 25, 2017
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 4, 2018
openstack-gerrit pushed a commit to ansible-community/ara that referenced this issue Dec 1, 2018
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
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 c:cli/ c:parsing/mod_args feature This issue/PR relates to a feature request. in progress needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants