fix: Always deploy unbound.conf.d/chatmail.conf (#993)

This fixes issue with negative cache
only disabled in ipv4-only mode.

Follow up to #992

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
Jagoda Estera Ślązak
2026-06-02 19:02:07 +09:00
committed by GitHub
parent e9e012234b
commit d898f41064
2 changed files with 10 additions and 10 deletions
+8 -10
View File
@@ -171,16 +171,14 @@ class UnboundDeployer(Deployer):
"unbound-anchor -a /var/lib/unbound/root.key || true", "unbound-anchor -a /var/lib/unbound/root.key || true",
], ],
) )
if self.config.disable_ipv6: self.ensure_directory(
self.ensure_directory( path="/etc/unbound/unbound.conf.d",
path="/etc/unbound/unbound.conf.d", )
) self.put_template(
self.put_template( "unbound/unbound.conf.j2",
"unbound/unbound.conf.j2", "/etc/unbound/unbound.conf.d/chatmail.conf",
"/etc/unbound/unbound.conf.d/chatmail.conf", disable_ipv6=self.config.disable_ipv6,
) )
else:
self.remove_file("/etc/unbound/unbound.conf.d/chatmail.conf")
def activate(self): def activate(self):
server.shell( server.shell(
@@ -1,5 +1,7 @@
# Managed by cmdeploy # Managed by cmdeploy
server: server:
{% if disable_ipv6 %}
interface: 127.0.0.1 interface: 127.0.0.1
do-ip6: no do-ip6: no
{% endif %}
cache-max-negative-ttl: 0 cache-max-negative-ttl: 0