diff --git a/plugins/module_utils/generic.py b/plugins/module_utils/generic.py index b6c6d23..646c8f5 100644 --- a/plugins/module_utils/generic.py +++ b/plugins/module_utils/generic.py @@ -102,3 +102,21 @@ def systemdbool(b: Union[bool, str]) -> str: elif b is False: return "no" return b + + +def modspec( + argument_spec: Dict[str, Dict[str, Any]], + mutually_exclusive: Sequence[Tuple[str, ...]] = (), + required_together: Sequence[Tuple[str, ...]] = (), + required_one_of: Sequence[Tuple[str, ...]] = (), + required_if: Sequence[Union[Tuple[str, Any, Tuple[str, ...]], Tuple[str, Any, Tuple[str, ...], bool]]] = (), + required_by: Dict[str, Union[str, Tuple[str, ...]]] = {}, +) -> Dict[str, Any]: + return dict( + argument_spec=argument_spec, + mutually_exclusive=mutually_exclusive, + required_together=required_together, + required_one_of=required_one_of, + required_if=required_if, + required_by=required_by, + )