allow_isolate is now used
Dieser Commit ist enthalten in:
Ursprung
76f4e64081
Commit
49c3ef1ae7
|
@ -3,10 +3,10 @@ import pathlib
|
||||||
from typing import List, Union
|
from typing import List, Union
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from ansible_collections.sebastian.systemd.plugins.module_utils.generic import SYSTEMD_SERVICE_CONFIG, Types
|
from ansible_collections.sebastian.systemd.plugins.module_utils.generic import SYSTEMD_SERVICE_CONFIG, Types, systemdbool
|
||||||
from ansible_collections.sebastian.systemd.plugins.module_utils.module import SystemdUnitModule, installable
|
from ansible_collections.sebastian.systemd.plugins.module_utils.module import SystemdUnitModule, installable
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from plugins.module_utils.generic import SYSTEMD_SERVICE_CONFIG, Types
|
from plugins.module_utils.generic import SYSTEMD_SERVICE_CONFIG, Types, systemdbool
|
||||||
from plugins.module_utils.module import SystemdUnitModule, installable
|
from plugins.module_utils.module import SystemdUnitModule, installable
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,12 +17,18 @@ class Module(SystemdUnitModule):
|
||||||
name = "target"
|
name = "target"
|
||||||
module_spec = dict(
|
module_spec = dict(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
description=Types.str(required=True),
|
description=Types.str(),
|
||||||
name=Types.str(required=True),
|
name=Types.str(required=True),
|
||||||
allow_isolate=Types.bool(default=False),
|
allow_isolate=Types.bool(default=False),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def header(self) -> str:
|
||||||
|
section = super().header()
|
||||||
|
section += "AllowIsolate={}".format(systemdbool(self.get("allow_isolate", False)))
|
||||||
|
return section
|
||||||
|
|
||||||
|
|
||||||
def unit(self) -> str:
|
def unit(self) -> str:
|
||||||
if self.__unit is None:
|
if self.__unit is None:
|
||||||
self.__unit = "\n".join(
|
self.__unit = "\n".join(
|
||||||
|
|
Laden…
In neuem Issue referenzieren