diff --git a/plugins/module_utils/module.py b/plugins/module_utils/module.py index 352189e..aa3fe1b 100644 --- a/plugins/module_utils/module.py +++ b/plugins/module_utils/module.py @@ -323,6 +323,8 @@ _INSTALL_MAPPING = dict( def installable(_class: Type[SystemdUnitModule]): """adds the required arguments to the spec and adds the install method for the unit method""" + specs = _class.module_spec + arguments = dict( required_by=Types.list(elements=str, help="systemd units that require this mount"), wanted_by=Types.list( @@ -330,7 +332,7 @@ def installable(_class: Type[SystemdUnitModule]): help="systemd units that want the mount, but not explicitly require it. Commonly used for target if not service explicitly require it.", ), ) - _class.module_spec["argument_spec"].update(arguments) + specs["argument_spec"].update(arguments) def install(self: SystemdUnitModule) -> str: output = "[Install]\n" @@ -341,4 +343,5 @@ def installable(_class: Type[SystemdUnitModule]): return output _class.install = install + _class.module_spec = specs return _class