From 7bec7376db1c49ce03c581f14ce539aca9ce0925 Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Sun, 23 Apr 2023 10:25:03 +0200 Subject: [PATCH] fixed the description generation part of docify --- plugins/module_utils/module.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/module_utils/module.py b/plugins/module_utils/module.py index caf7471..523443a 100644 --- a/plugins/module_utils/module.py +++ b/plugins/module_utils/module.py @@ -25,8 +25,10 @@ def docify(input: Union[dict, AnsibleParameter]) -> dict: options = dict() for name, help in input.items(): options[name] = dict(type=help["type"]) - if "description" in help and isinstance(help["description"], str): - options[name]["description"] = options[name]["description"].split("\n") + if "description" in help: + if isinstance(help["description"], str): + help["description"] = help["description"].split("\n") + options[name]["description"] = help["description"] if "required" in help and help["required"]: options[name]["required"] = True else: