From afa79f867f3fdb68a5cdd893f36dc98ca44c91d7 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 29 Jan 2026 09:18:48 +0200 Subject: Smart A/AAAA record generation for ipv4/ipv6 only hosts Amp-Thread-ID: https://ampcode.com/threads/T-019c086d-c760-779d-b740-0f748094b62a Co-authored-by: Amp --- frontends/var/nsd/zones/master/buetow.org.zone.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontends/var/nsd/zones/master/buetow.org.zone.tpl b/frontends/var/nsd/zones/master/buetow.org.zone.tpl index 33e0621..03dabb1 100644 --- a/frontends/var/nsd/zones/master/buetow.org.zone.tpl +++ b/frontends/var/nsd/zones/master/buetow.org.zone.tpl @@ -55,8 +55,8 @@ standby.tmp 300 IN A <%= $ips->{current_standby}{ipv4} %> ; Enable failover standby.tmp 300 IN AAAA <%= $ips->{current_standby}{ipv6} %> ; Enable failover <% for my $host (@$f3s_hosts) { - my $is_ipv6_only = $host =~ /ipv6\./; - my $is_ipv4_only = $host =~ /ipv4\./; + my $is_ipv6_only = $host =~ /^ipv6\./; + my $is_ipv4_only = $host =~ /^ipv4\./; -%> <% unless ($is_ipv6_only) { -%> <%= $host %>. 300 IN A <%= $ips->{current_master}{ipv4} %> ; Enable failover -- cgit v1.2.3