diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-28 23:04:14 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-28 23:04:14 +0300 |
| commit | 072fb48d79c3ccc2e97ddd3c803851a57e92c520 (patch) | |
| tree | f8f29bfb343c273a0d56246c66a83bf5c4fb167b | |
| parent | 25043ddcdde5fe73bb0db6d22d516a2c443ed513 (diff) | |
Update
| -rw-r--r-- | frontends/Rexfile | 11 | ||||
| -rw-r--r-- | frontends/var/nsd/zones/master/buetow.org.zone.tpl | 14 |
2 files changed, 17 insertions, 8 deletions
diff --git a/frontends/Rexfile b/frontends/Rexfile index 995aebc..d269eb5 100644 --- a/frontends/Rexfile +++ b/frontends/Rexfile @@ -73,7 +73,10 @@ our $secrets = sub { read_file './secrets/' . shift }; our @dns_zones = qw/buetow.org dtail.dev foo.zone irregular.ninja snonux.foo paul.cyou/; our @dns_zones_remove = qw//; -our @f3s_hosts = qw/f3s.buetow.org/; # k3s cluster running on FreeBSD in my LAN + +# k3s cluster running on FreeBSD in my LAN +our @f3s_hosts = + qw/f3s.buetow.org anki.f3s.buetow.org bag.f3s.buetow.org flux.f3s.buetow.org audiobookshelf.f3s.buetow.org gpodder.f3s.buetow.org radicale.f3s.buetow.org vault.f3s.buetow.org syncthing.f3s.buetow.org uprecords.f3s.buetow.org/; our @acme_hosts = qw/buetow.org git.buetow.org paul.buetow.org dory.buetow.org solarcat.buetow.org blog.buetow.org fotos.buetow.org znc.buetow.org dtail.dev foo.zone stats.foo.zone irregular.ninja alt.irregular.ninja snonux.foo/; push @acme_hosts, @f3s_hosts; @@ -343,7 +346,11 @@ task 'nsd', for my $zone (@dns_zones) { Rex::Logger::info("Dealing with DNS zone $zone"); file "/var/nsd/zones/master/$zone.zone", - content => template( "./var/nsd/zones/master/$zone.zone.tpl", ips => \%ips, ), + content => template( + "./var/nsd/zones/master/$zone.zone.tpl", + ips => \%ips, + f3s_hosts => \@f3s_hosts + ), owner => 'root', group => 'wheel', mode => '644', diff --git a/frontends/var/nsd/zones/master/buetow.org.zone.tpl b/frontends/var/nsd/zones/master/buetow.org.zone.tpl index bb67a65..b660f29 100644 --- a/frontends/var/nsd/zones/master/buetow.org.zone.tpl +++ b/frontends/var/nsd/zones/master/buetow.org.zone.tpl @@ -47,12 +47,14 @@ www.tmp 300 IN AAAA <%= $ips->{current_master}{ipv6} %> ; Enable failover standby.tmp 300 IN A <%= $ips->{current_standby}{ipv4} %> ; Enable failover standby.tmp 300 IN AAAA <%= $ips->{current_standby}{ipv6} %> ; Enable failover -f3s 300 IN A <%= $ips->{current_master}{ipv4} %> ; Enable failover -f3s 300 IN AAAA <%= $ips->{current_master}{ipv6} %> ; Enable failover -www.f3s 300 IN A <%= $ips->{current_master}{ipv4} %> ; Enable failover -www.f3s 300 IN AAAA <%= $ips->{current_master}{ipv6} %> ; Enable failover -standby.f3s 300 IN A <%= $ips->{current_standby}{ipv4} %> ; Enable failover -standby.f3s 300 IN AAAA <%= $ips->{current_standby}{ipv6} %> ; Enable failover +<% for my $host (@$f3s_hosts) { -%> +<%= $host %>. 300 IN A <%= $ips->{current_master}{ipv4} %> ; Enable failover +<%= $host %>. 300 IN AAAA <%= $ips->{current_master}{ipv6} %> ; Enable failover +www.<%= $host %>. 300 IN A <%= $ips->{current_master}{ipv4} %> ; Enable failover +www.<%= $host %>. 300 IN AAAA <%= $ips->{current_master}{ipv6} %> ; Enable failover +standby.<%= $host %>. 300 IN A <%= $ips->{current_standby}{ipv4} %> ; Enable failover +standby.<%= $host %>. 300 IN AAAA <%= $ips->{current_standby}{ipv6} %> ; Enable failover +<% } -%> dory 300 IN A <%= $ips->{current_master}{ipv4} %> ; Enable failover dory 300 IN AAAA <%= $ips->{current_master}{ipv6} %> ; Enable failover |
