From adfd8a3ba3534fdad7f57c1d66c73a8c4df80217 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Wed, 5 Aug 2020 01:02:57 +0000 Subject: [PATCH] Fix conditional, tweak monit wireguard monitoring configuration --- roles/monit/tasks/main.yml | 2 +- roles/monit/templates/wireguard | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/monit/tasks/main.yml b/roles/monit/tasks/main.yml index 297c397..4e37b2b 100644 --- a/roles/monit/tasks/main.yml +++ b/roles/monit/tasks/main.yml @@ -49,7 +49,7 @@ owner: root group: root mode: 0600 - when: {{ monit_wireguard }} + when: monit_wireguard notify: - restart monit tags: diff --git a/roles/monit/templates/wireguard b/roles/monit/templates/wireguard index 2d0509b..1d228d4 100644 --- a/roles/monit/templates/wireguard +++ b/roles/monit/templates/wireguard @@ -1,5 +1,5 @@ check host wireguard address {{ monit_wireguard_ip }} start program = "/usr/bin/systemctl start wg-quick@wg0" stop program = "/usr/bin/systemctl stop wg-quick@wg0" - if does not exist then alert - if does not exist for 3 cycles then restart + if failed then alert + if failed for 3 cycles then restart