diff --git a/plugins/module_utils/module.py b/plugins/module_utils/module.py index 676ae4f..1b84b31 100644 --- a/plugins/module_utils/module.py +++ b/plugins/module_utils/module.py @@ -1,5 +1,6 @@ import pathlib -from typing import Any, Callable, ClassVar, Dict, NoReturn, Optional, Type, TypeVar, overload +from copy import deepcopy +from typing import Any, Callable, ClassVar, Dict, NoReturn, Optional, Type, TypeVar, Union, overload import ansible.module_utils.basic as basic @@ -39,8 +40,8 @@ class AnsibleModule(object): def __init__(self): self.result = dict(changed=False) specs = dict() - specs.update(self._common_args) - modspec = self.module_spec.copy() + specs.update(deepcopy(self._common_args)) + modspec = self.module_spec if "argument_spec" in modspec and "argument_spec" in self._common_args: specs["argument_spec"].update(modspec["argument_spec"]) del modspec["argument_spec"]