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