chore: fix ruff formatting in acmetool, dovecot, postfix deployers

This commit is contained in:
Alex V.
2026-02-07 16:27:46 +03:00
parent dfcaf415b1
commit ea52fde2d9
3 changed files with 7 additions and 3 deletions

View File

@@ -67,7 +67,7 @@ class AcmetoolDeployer(Deployer):
) )
files.template( files.template(
src=importlib.resources.files(__package__).joinpath("desired.yaml.j2"), src=importlib.resources.files(__package__).joinpath("desired.yaml.j2"),
dest=f"/var/lib/acme/desired/{self.domains[0]}", # 0 is mailhost TLD dest=f"/var/lib/acme/desired/{self.domains[0]}", # 0 is mailhost TLD
user="root", user="root",
group="root", group="root",
mode="644", mode="644",

View File

@@ -37,7 +37,9 @@ class DovecotDeployer(Deployer):
restart = False if self.disable_mail else self.need_restart restart = False if self.disable_mail else self.need_restart
systemd.service( systemd.service(
name="Disable dovecot for now" if self.disable_mail else "Start and enable Dovecot", name="Disable dovecot for now"
if self.disable_mail
else "Start and enable Dovecot",
service="dovecot.service", service="dovecot.service",
running=False if self.disable_mail else True, running=False if self.disable_mail else True,
enabled=False if self.disable_mail else True, enabled=False if self.disable_mail else True,

View File

@@ -83,7 +83,9 @@ class PostfixDeployer(Deployer):
server.shell( server.shell(
name="Validate postfix configuration", name="Validate postfix configuration",
# Extract stderr and quit with error if non-zero # Extract stderr and quit with error if non-zero
commands=["""bash -c 'w=$(postconf 2>&1 >/dev/null); [[ -z "$w" ]] || { echo "$w"; false; }'"""], commands=[
"""bash -c 'w=$(postconf 2>&1 >/dev/null); [[ -z "$w" ]] || { echo "$w"; false; }'"""
],
) )
self.need_restart = need_restart self.need_restart = need_restart