From 82251b973f90e303b909f1e41a7bb87f39a15cd4 Mon Sep 17 00:00:00 2001 From: gov Date: Tue, 4 Aug 2026 18:14:15 -0400 Subject: [PATCH] feat: health check --- playbook.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/playbook.yml b/playbook.yml index c01b30f..46f4152 100644 --- a/playbook.yml +++ b/playbook.yml @@ -114,6 +114,27 @@ dest: /usr/local/bin/pdsadmin mode: "0755" + - name: Flush handlers + meta: flush_handlers + + - name: PDS Health check + uri: + url: "https://{{ pds_hostname }}/xrpc/_health" + method: GET + status_code: 200 + retries: 3 + delay: 5 + + - name: Check backup timer is active + command: systemctl is-active pds-backup.timer + changed_when: false + + - name: Check last backup run succeeded + shell: systemctl show pds-backup.service -p ExecMainStatus --value + register: pds_backup_exit_code + changed_when: false + failed_when: pds_backup_exit_code.stdout != "0" + handlers: - name: apply changes shell: cd {{ pds_data_dir }} && docker compose up -d && docker restart caddy