From 9ccdc4624893b1428340b26bc6a7a0f124fe4b44 Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Fri, 21 Apr 2023 21:11:24 +0200 Subject: [PATCH] somemore debugging --- plugins/modules/target.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/modules/target.py b/plugins/modules/target.py index 280f37f..5a54966 100644 --- a/plugins/modules/target.py +++ b/plugins/modules/target.py @@ -24,8 +24,11 @@ class Module(SystemdUnitModule): ) def prepare(self): - self.unitfile = (SYSTEMD_SERVICE_CONFIG/ self.get("name")).with_stem(".target") - self.set("name", self.get(name)) + try: + self.unitfile = (SYSTEMD_SERVICE_CONFIG/ self.get("name")).with_stem(".target") + self.set("name", self.get(name)) + except KeyError: + self.set("params", self.params) self.__unit = None def header(self) -> str: