From 6f2e2f4eef379d4af960a1bd7ae6f4bfbb2401ef Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 10 Apr 2026 23:05:27 +0300 Subject: fix --- frontends/Rexfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'frontends/Rexfile') 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'; -- cgit v1.2.3