map_param now adds newlines to the lines it generates
Dieser Commit ist enthalten in:
Ursprung
ec82abe3d4
Commit
c3404200a9
|
@ -250,9 +250,9 @@ class SystemdUnitModule(AnsibleModule):
|
|||
if self.params[param] is not None:
|
||||
params = self.params[param]
|
||||
if isinstance(params, list):
|
||||
output.extend(("{}={}".format(key, p) for p in params))
|
||||
output.extend(("{}={}\n".format(key, p) for p in params))
|
||||
else:
|
||||
output.append("{}={}".format(key, self.params[param]))
|
||||
output.append("{}={}\n".format(key, self.params[param]))
|
||||
return output
|
||||
|
||||
def unitfile_gen(self):
|
||||
|
|
|
@ -52,7 +52,7 @@ class Module(SystemdUnitModule): # type: ignore
|
|||
type="Type",
|
||||
kind="Kind",
|
||||
)
|
||||
return "[Match]\n" + "\n".join(options)
|
||||
return "[Match]\n" + "".join(options)
|
||||
|
||||
def link(self) -> str:
|
||||
options = []
|
||||
|
|
|
@ -48,7 +48,7 @@ class Module(SystemdUnitModule, SystemdReloadMixin): # type: ignore
|
|||
|
||||
def socket(self):
|
||||
section = "[Socket]\n"
|
||||
section += "\n".join(
|
||||
section += "".join(
|
||||
self.map_param(
|
||||
stream="ListenStream",
|
||||
datagram="ListenDatagram",
|
||||
|
|
|
@ -60,7 +60,7 @@ class Module(SystemdUnitModule, SystemdReloadMixin):
|
|||
|
||||
def service(self):
|
||||
section = "[Service]\n"
|
||||
section += "\n".join(
|
||||
section += "".join(
|
||||
self.map_param(
|
||||
type="Type",
|
||||
pre="ExecStartPre",
|
||||
|
|
Laden…
In neuem Issue referenzieren