From 7aa9f0b9eb383a6db8683bfa59f9661bcbc3eb8c Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 26 Aug 2025 11:44:42 +0200 Subject: [PATCH] cmdeploy: enable running DNS zonefile check locally --- cmdeploy/src/cmdeploy/dns.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmdeploy/src/cmdeploy/dns.py b/cmdeploy/src/cmdeploy/dns.py index ec69cdc8..74537a62 100644 --- a/cmdeploy/src/cmdeploy/dns.py +++ b/cmdeploy/src/cmdeploy/dns.py @@ -48,10 +48,13 @@ def check_full_zone(sshexec, remote_data, out, zonefile) -> int: """Check existing DNS records, optionally write them to zone file and return (exitcode, remote_data) tuple.""" - required_diff, recommended_diff = sshexec.logged( - remote.rdns.check_zonefile, - kwargs=dict(zonefile=zonefile, mail_domain=remote_data["mail_domain"]), - ) + if sshexec in ["docker", "localhost"]: + required_diff, recommended_diff = remote.rdns.check_zonefile(zonefile, remote_data["mail_domain"]) + else: + required_diff, recommended_diff = sshexec.logged( + remote.rdns.check_zonefile, + kwargs=dict(zonefile=zonefile, mail_domain=remote_data["mail_domain"]), + ) returncode = 0 if required_diff: