diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2024-07-06 10:47:33 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2024-07-06 10:47:33 +0200 |
commit | 782b375a2eb13c7d15e693a62a11b54e03524a16 (patch) | |
tree | dad96f16cdb2bdf795b3c42406b7f0c3cd35d12f /roles/wireguard/tasks | |
parent | 3194ffd5bd9d674f19ee49f8fbce406cdc9666aa (diff) | |
download | rules-782b375a2eb13c7d15e693a62a11b54e03524a16.tar.gz |
feat(roles/wireguard): restart interface if gateway is unreachable
Diffstat (limited to 'roles/wireguard/tasks')
-rw-r--r-- | roles/wireguard/tasks/cron.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/wireguard/tasks/cron.yml b/roles/wireguard/tasks/cron.yml index 9194648..3d723e5 100644 --- a/roles/wireguard/tasks/cron.yml +++ b/roles/wireguard/tasks/cron.yml @@ -3,5 +3,5 @@ - name: add cronjob for keepalive ansible.builtin.cron: name: keepalive network traffic to domain controller - user: nobody - job: ping -c 1 {{ hostvars[wireguard__domain_controller].__ip.external }} + user: root + job: "! ping -c 1 -w 1 {{ hostvars[wireguard__domain_controller].__ip.external }} && wg-quick down {{ wireguard__interface_name }} && wg-quick up {{ wireguard__interface_name }}" |