diff options
Diffstat (limited to 'frontends')
| -rw-r--r-- | frontends/Rexfile | 13 | ||||
| -rw-r--r-- | frontends/etc/gogios.json.tpl | 13 |
2 files changed, 14 insertions, 12 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'; diff --git a/frontends/etc/gogios.json.tpl b/frontends/etc/gogios.json.tpl index 7661275..122e867 100644 --- a/frontends/etc/gogios.json.tpl +++ b/frontends/etc/gogios.json.tpl @@ -83,22 +83,11 @@ <% for my $host (qw(pi0 pi1)) { -%> "Check HTTP <%= $host %>.wg0.wan.buetow.org": { "Plugin": "<%= $plugin_dir %>/check_http", + "OnlyIfNotExists": "/tmp/f3s_taken_down", "RandomSpread": 10, "Args": ["<%= $host %>.wg0.wan.buetow.org", "-4"] }, <% } -%> - <% for my $host (qw(pi2 pi3)) { -%> - "Check HTTP Admin <%= $host %>.lan.buetow.org": { - "Plugin": "<%= $plugin_dir %>/check_http", - "RandomSpread": 10, - "Args": ["<%= $host %>.lan.buetow.org", "-4", "-u", "/admin/"] - }, - "Check DNS <%= $host %>.lan.buetow.org": { - "Plugin": "<%= $plugin_dir %>/check_dig", - "RandomSpread": 10, - "Args": ["-H", "<%= $host %>.lan.buetow.org", "-l", "google.com", "-4"] - }, - <% } -%> <% for my $host (@$acme_hosts) { # Skip server hostnames - they have dedicated checks above without www/standby variants next if $host eq 'blowfish.buetow.org' or $host eq 'fishfinger.buetow.org'; |
