From c5e6129682a32caaf74330ad6fc403deb83a33f6 Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Sat, 16 Mar 2024 14:15:50 +0100 Subject: [PATCH] modspec now supports supports_check_mode and add_file_common_args --- changelogs/fragments/dev.yml | 3 +++ plugins/module_utils/generic.py | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 changelogs/fragments/dev.yml diff --git a/changelogs/fragments/dev.yml b/changelogs/fragments/dev.yml new file mode 100644 index 0000000..828d115 --- /dev/null +++ b/changelogs/fragments/dev.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - modspec now supports supports_check_mode and add_file_common_args diff --git a/plugins/module_utils/generic.py b/plugins/module_utils/generic.py index 7a781fd..c36d69e 100644 --- a/plugins/module_utils/generic.py +++ b/plugins/module_utils/generic.py @@ -151,6 +151,8 @@ def modspec( 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, ...]]] = {}, + supports_check_mode: bool = False, + add_file_common_args: bool = False, ) -> Dict[str, Any]: # pragma: nocover return dict( argument_spec=argument_spec, @@ -159,6 +161,8 @@ def modspec( required_one_of=required_one_of, required_if=required_if, required_by=required_by, + add_file_common_args=add_file_common_args, + supports_check_mode=supports_check_mode, )