uptime-kuma: add uptime_kuma_enabled flag and make monitoring blocks inert
Removing the credentials would otherwise break these playbooks mid-deploy: they template uptime_kuma_password with no assert to stop them first. 100 tasks are now guarded by uptime_kuma_enabled (false), so deployments run normally and the monitoring sections skip. A further 28 tasks were already self-guarding on monitor_setup/push_url being defined; verified that a skipped task's registered variable makes those skip cleanly rather than error. The blocks are kept on purpose — the health-check logic is the durable part and should be rewired to whatever replaces Uptime Kuma. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
80c9e6f3e3
commit
2dabc6ad62
15 changed files with 240 additions and 0 deletions
|
|
@ -253,7 +253,18 @@
|
|||
# ===========================================
|
||||
# Health Check Script + Systemd Timer
|
||||
# ===========================================
|
||||
# ═════════════════════════════════════════════════════════════════════════
|
||||
# DEPRECATED — Uptime Kuma was decommissioned on 2026-09-11.
|
||||
#
|
||||
# Every task below is inert: uptime_kuma_enabled is false in
|
||||
# group_vars/all/main.yml, so they all skip and the deployment above still
|
||||
# runs normally. Kept because the health-check logic is the durable part —
|
||||
# when a replacement exists, rewire the push transport and flip the flag.
|
||||
#
|
||||
# What was being monitored: archive/uptime_kuma/MONITORS.md
|
||||
# ═════════════════════════════════════════════════════════════════════════
|
||||
- name: Create phoenixd health check script
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
copy:
|
||||
dest: "{{ phoenixd_healthcheck_script_path }}"
|
||||
content: |
|
||||
|
|
@ -340,6 +351,7 @@
|
|||
daemon_reload: yes
|
||||
|
||||
- name: Enable and start phoenixd health check timer
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
systemd:
|
||||
name: "{{ phoenixd_healthcheck_service_name }}.timer"
|
||||
enabled: yes
|
||||
|
|
@ -349,6 +361,7 @@
|
|||
# Uptime Kuma Push Monitor Setup
|
||||
# ===========================================
|
||||
- name: Create Uptime Kuma push monitor setup script for phoenixd
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
copy:
|
||||
|
|
@ -443,6 +456,7 @@
|
|||
mode: "0755"
|
||||
|
||||
- name: Create temporary config for push monitor setup
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
copy:
|
||||
|
|
@ -455,6 +469,7 @@
|
|||
mode: "0644"
|
||||
|
||||
- name: Run Uptime Kuma push monitor setup
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
command: python3 /tmp/setup_phoenixd_monitor.py
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
|
|
@ -468,6 +483,7 @@
|
|||
when: monitor_setup.stdout is defined
|
||||
|
||||
- name: Read push URL from file
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
slurp:
|
||||
src: /tmp/phoenixd_push_url.txt
|
||||
delegate_to: localhost
|
||||
|
|
@ -489,6 +505,7 @@
|
|||
notify: Restart phoenixd health check timer
|
||||
|
||||
- name: Clean up temporary files
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
file:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue