1
0
Fork 0

added missing __unit cache

Dieser Commit ist enthalten in:
Sebastian Tobie 2023-04-21 20:56:16 +02:00
Ursprung d1390f7150
Commit aa1a4db56c
2 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -43,6 +43,7 @@ class Module(SystemdUnitModule):
def prepare(self): def prepare(self):
self.unitfile = (SYSTEMD_SERVICE_CONFIG / self.get("name")).with_stem(".service") self.unitfile = (SYSTEMD_SERVICE_CONFIG / self.get("name")).with_stem(".service")
self.__unit = None
if self.get("type", "simple") != "oneshot" and len(self.get("start")) > 1: if self.get("type", "simple") != "oneshot" and len(self.get("start")) > 1:
self.module.fail_json("only oneshot services are allowed to have multiple start commands", **self.result) self.module.fail_json("only oneshot services are allowed to have multiple start commands", **self.result)

Datei anzeigen

@ -25,6 +25,7 @@ class Module(SystemdUnitModule):
def prepare(self): def prepare(self):
self.unitfile = (SYSTEMD_SERVICE_CONFIG/ self.get("name")).with_stem(".target") self.unitfile = (SYSTEMD_SERVICE_CONFIG/ self.get("name")).with_stem(".target")
self.__unit = None
def header(self) -> str: def header(self) -> str:
section = super().header() section = super().header()