Skip to content

Commit

Permalink
Equivalent to ansible/ansible#72359.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Nov 2, 2020
1 parent 89a4536 commit 273d010
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion antsibull/data/collection-enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ansible.galaxy.collection import CollectionRequirement
from ansible.module_utils._text import to_native
from ansible.module_utils.common.json import AnsibleJSONEncoder
from ansible.plugins.loader import fragment_loader
from ansible.plugins.loader import action_loader, fragment_loader
from ansible.utils.collection_loader import AnsibleCollectionConfig
from ansible.utils.plugin_docs import get_docstring

Expand Down Expand Up @@ -53,6 +53,13 @@ def load_plugin(loader, plugin_type, plugin):
documentation['filename'] = filename
documentation['collection'] = collection_name

if plugin_type == 'module':
# is there corresponding action plugin?
if plugin in action_loader:
documentation['has_action'] = True
else:
documentation['has_action'] = False

ansible_doc = {
'doc': documentation,
'examples': plainexamples,
Expand Down

0 comments on commit 273d010

Please sign in to comment.