diff --git a/plugins/module_utils/module.py b/plugins/module_utils/module.py index 0f20c7f..81fa69e 100644 --- a/plugins/module_utils/module.py +++ b/plugins/module_utils/module.py @@ -5,9 +5,9 @@ from typing import Any, Callable, ClassVar, Dict, NoReturn, Optional, Type, Type import ansible.module_utils.basic as basic try: - from ansible_collections.sebastian.systemd.plugins.module_utils.generic import AnsibleParameter, Types + from ansible_collections.sebastian.systemd.plugins.module_utils.generic import AnsibleParameter, Types,systemdbool except ImportError: - from plugins.module_utils.generic import AnsibleParameter, Types + from plugins.module_utils.generic import AnsibleParameter, Types,systemdbool __all__ = ( @@ -230,7 +230,7 @@ class SystemdUnitModule(AnsibleModule): def header(self) -> str: header = "[Unit]\n" - header += "\n".join( + header += "".join( self.map_param( description="Description", documentation="Documentation", @@ -250,9 +250,9 @@ class SystemdUnitModule(AnsibleModule): if self.params[param] is not None: params = self.params[param] if isinstance(params, list): - output.extend((f"{key}={p}\n" for p in params)) + output.extend((f"{key}={systemdbool(p)}\n" for p in params)) else: - output.append(f"{key}={self.params[param]}\n") + output.append(f"{key}={systemdbool(params)}\n") return output def unitfile_gen(self):