summaryrefslogtreecommitdiff
path: root/frontends/Rexfile
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-10 23:05:27 +0300
committerPaul Buetow <paul@buetow.org>2026-04-10 23:05:27 +0300
commit6f2e2f4eef379d4af960a1bd7ae6f4bfbb2401ef (patch)
tree43ceca19f68a228911a36e8a1b63cce71bf8991b /frontends/Rexfile
parentc952579d1303558685c61cec1b688716f383bfd0 (diff)
fix
Diffstat (limited to 'frontends/Rexfile')
-rw-r--r--frontends/Rexfile13
1 files changed, 13 insertions, 0 deletions
diff --git a/frontends/Rexfile b/frontends/Rexfile
index 7407f90..1cf1979 100644
--- a/frontends/Rexfile
+++ b/frontends/Rexfile
@@ -149,6 +149,18 @@ task 'base',
mode => '755';
};
+desc 'Append WireGuard mesh hostnames to /etc/hosts (IPv4 + IPv6)';
+task 'hosts_wg',
+ group => 'frontends',
+ sub {
+ my @lines = split /\n/, read_file('./etc/hosts.wg.append');
+ for my $line (@lines) {
+ next if $line =~ /^\s*#/;
+ next if $line =~ /^\s*$/;
+ append_if_no_such_line '/etc/hosts', $line;
+ }
+ };
+
desc 'Setup uptimed';
task 'uptimed',
group => 'frontends',
@@ -748,6 +760,7 @@ task 'commons',
group => 'frontends',
sub {
run_task 'base';
+ run_task 'hosts_wg';
run_task 'pf';
run_task 'nsd';
run_task 'nsd_failover';