diff --git a/cmdeploy/src/cmdeploy/basedeploy.py b/cmdeploy/src/cmdeploy/basedeploy.py index daa12aa4..7490641c 100644 --- a/cmdeploy/src/cmdeploy/basedeploy.py +++ b/cmdeploy/src/cmdeploy/basedeploy.py @@ -9,7 +9,7 @@ def get_resource(arg, pkg=__package__): return importlib.resources.files(pkg).joinpath(arg) -def _configure_remote_units(mail_domain, units) -> None: +def configure_remote_units(mail_domain, units) -> None: remote_base_dir = "/usr/local/lib/chatmaild" remote_venv_dir = f"{remote_base_dir}/venv" remote_chatmail_inipath = f"{remote_base_dir}/chatmail.ini" @@ -38,7 +38,7 @@ def _configure_remote_units(mail_domain, units) -> None: ) -def _activate_remote_units(units) -> None: +def activate_remote_units(units) -> None: # activate systemd units for fn in units: basename = fn if "." in fn else f"{fn}.service" diff --git a/cmdeploy/src/cmdeploy/deployers.py b/cmdeploy/src/cmdeploy/deployers.py index 0da70691..35aaca18 100644 --- a/cmdeploy/src/cmdeploy/deployers.py +++ b/cmdeploy/src/cmdeploy/deployers.py @@ -21,8 +21,8 @@ from .acmetool import AcmetoolDeployer from .basedeploy import ( Deployer, Deployment, - _activate_remote_units, - _configure_remote_units, + activate_remote_units, + configure_remote_units, get_resource, ) from .dovecot.deployer import DovecotDeployer @@ -315,10 +315,10 @@ class TurnDeployer(Deployer): ) def configure(self): - _configure_remote_units(self.mail_domain, self.units) + configure_remote_units(self.mail_domain, self.units) def activate(self): - _activate_remote_units(self.units) + activate_remote_units(self.units) class IrohDeployer(Deployer): @@ -422,10 +422,10 @@ class EchobotDeployer(Deployer): ) def configure(self): - _configure_remote_units(self.mail_domain, self.units) + configure_remote_units(self.mail_domain, self.units) def activate(self): - _activate_remote_units(self.units) + activate_remote_units(self.units) class ChatmailVenvDeployer(Deployer): @@ -447,10 +447,10 @@ class ChatmailVenvDeployer(Deployer): def configure(self): _configure_remote_venv_with_chatmaild(self.config) - _configure_remote_units(self.config.mail_domain, self.units) + configure_remote_units(self.config.mail_domain, self.units) def activate(self): - _activate_remote_units(self.units) + activate_remote_units(self.units) class ChatmailDeployer(Deployer): diff --git a/cmdeploy/src/cmdeploy/dovecot/deployer.py b/cmdeploy/src/cmdeploy/dovecot/deployer.py index a2a9b312..dfe9de1d 100644 --- a/cmdeploy/src/cmdeploy/dovecot/deployer.py +++ b/cmdeploy/src/cmdeploy/dovecot/deployer.py @@ -6,8 +6,8 @@ from pyinfra.operations import apt, files, server, systemd from cmdeploy.basedeploy import ( Deployer, - _activate_remote_units, - _configure_remote_units, + activate_remote_units, + configure_remote_units, get_resource, ) @@ -26,11 +26,11 @@ class DovecotDeployer(Deployer): _install_dovecot_package("lmtpd", arch) def configure(self): - _configure_remote_units(self.config.mail_domain, self.units) + configure_remote_units(self.config.mail_domain, self.units) self.need_restart = _configure_dovecot(self.config) def activate(self): - _activate_remote_units(self.units) + activate_remote_units(self.units) restart = False if self.disable_mail else self.need_restart