From c1758ebe15115bdee419dc2cb1e61a044b150f14 Mon Sep 17 00:00:00 2001 From: administrator Date: Thu, 20 Aug 2026 11:09:58 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20playbooks/check=5Fvpn.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playbooks/check_vpn.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 playbooks/check_vpn.yml diff --git a/playbooks/check_vpn.yml b/playbooks/check_vpn.yml new file mode 100644 index 0000000..bb556da --- /dev/null +++ b/playbooks/check_vpn.yml @@ -0,0 +1,11 @@ +- name: Check and reconnect AdGuard VPN + hosts: raspberry # или имя хоста из инвентори + tasks: + - name: Get VPN status + command: adguardvpn-cli status + register: vpn_status + changed_when: false + + - name: Reconnect if disconnected + command: adguardvpn-cli connect + when: "'Disconnected' in vpn_status.stdout" \ No newline at end of file