From 68df507cb1477dab73b17dd9b5f89b11abd378cc Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Fri, 21 Apr 2023 00:14:19 +0200 Subject: [PATCH] argument_spec is now better documented --- plugins/module_utils/module.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/module_utils/module.py b/plugins/module_utils/module.py index 3db8bed..2756226 100644 --- a/plugins/module_utils/module.py +++ b/plugins/module_utils/module.py @@ -145,7 +145,12 @@ class AnsibleModule(object): doc = "" options = dict() help: _sdict - for option, help in cls.module_spec["argument_spec"].items(): + specs = dict() + if "argument_spec" in cls._common_args: + specs.update(cls._common_args["argument_spec"]) + if "argument_spec" in cls.module_spec: + specs.update(cls.module_spec["argument_spec"]) + for option, help in specs.items(): options[option] = dict( type=help["type"], )