From 273d0100b9829eb9ced07f0ed0f6b437df03f50f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 27 Oct 2020 16:37:45 +0100 Subject: [PATCH] Equivalent to ansible/ansible#72359. --- antsibull/data/collection-enum.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/antsibull/data/collection-enum.py b/antsibull/data/collection-enum.py index 9e7ec2666..a0636c043 100644 --- a/antsibull/data/collection-enum.py +++ b/antsibull/data/collection-enum.py @@ -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 @@ -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,