--- # Part of role: pia-gateway # Included by: tasks/main.yaml # Description: Installs the observability-only health check (oneshot # service + timer). Since the auto-recovery work it runs # `pia-gateway check` — the same status classification the recovery # controller uses — instead of the earlier standalone bash script, so # the two can never disagree about what "healthy" means. It still never # remediates. - name: Remove the superseded bash health check script ansible.builtin.file: path: /usr/local/sbin/pia-gateway-healthcheck.sh state: absent - name: Deploy the health check systemd service ansible.builtin.template: src: pia-gateway-healthcheck.service.j2 dest: /etc/systemd/system/pia-gateway-healthcheck.service mode: "0644" owner: root group: root notify: - Reload systemd daemon - Restart pia-gateway-healthcheck timer - name: Deploy the health check systemd timer ansible.builtin.template: src: pia-gateway-healthcheck.timer.j2 dest: /etc/systemd/system/pia-gateway-healthcheck.timer mode: "0644" owner: root group: root notify: - Reload systemd daemon - Restart pia-gateway-healthcheck timer - name: Enable and start the health check timer ansible.builtin.systemd: name: pia-gateway-healthcheck.timer enabled: true state: started daemon_reload: true