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
|
|
@ -259,7 +259,18 @@
|
|||
debug:
|
||||
msg: "Fulcrum service is {{ 'running' if fulcrum_service_status.status.ActiveState == 'active' else 'not running' }}"
|
||||
|
||||
# ═════════════════════════════════════════════════════════════════════════
|
||||
# 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 Fulcrum health check and push script
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
copy:
|
||||
dest: /usr/local/bin/fulcrum-healthcheck-push.sh
|
||||
content: |
|
||||
|
|
@ -332,6 +343,7 @@
|
|||
mode: '0644'
|
||||
|
||||
- name: Create systemd service for Fulcrum health check
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
copy:
|
||||
dest: /etc/systemd/system/fulcrum-healthcheck.service
|
||||
content: |
|
||||
|
|
@ -364,6 +376,7 @@
|
|||
state: started
|
||||
|
||||
- name: Create Uptime Kuma push monitor setup script for Fulcrum
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
copy:
|
||||
|
|
@ -453,6 +466,7 @@
|
|||
mode: '0755'
|
||||
|
||||
- name: Create temporary config for monitor setup
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
copy:
|
||||
|
|
@ -465,6 +479,7 @@
|
|||
mode: '0644'
|
||||
|
||||
- name: Run Uptime Kuma push monitor setup
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
command: python3 /tmp/setup_fulcrum_monitor.py
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
|
|
@ -505,6 +520,7 @@
|
|||
when: uptime_kuma_push_url | default('') != ''
|
||||
|
||||
- name: Clean up temporary files
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
file:
|
||||
|
|
@ -518,6 +534,7 @@
|
|||
|
||||
handlers:
|
||||
- name: Restart fulcrum
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
systemd:
|
||||
name: fulcrum
|
||||
state: restarted
|
||||
|
|
@ -593,6 +610,7 @@
|
|||
ignore_errors: yes
|
||||
|
||||
- name: Display public endpoint
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
debug:
|
||||
msg: "Fulcrum SSL public endpoint: {{ ansible_host }}:{{ fulcrum_ssl_port }}"
|
||||
|
||||
|
|
@ -600,6 +618,7 @@
|
|||
# Uptime Kuma TCP Monitor for Public SSL Port
|
||||
# ===========================================
|
||||
- name: Create Uptime Kuma TCP monitor setup script for Fulcrum SSL
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
copy:
|
||||
|
|
@ -672,6 +691,7 @@
|
|||
mode: '0755'
|
||||
|
||||
- name: Create temporary config for TCP monitor setup
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
copy:
|
||||
|
|
@ -686,6 +706,7 @@
|
|||
mode: '0644'
|
||||
|
||||
- name: Run Uptime Kuma TCP monitor setup
|
||||
when: uptime_kuma_enabled | default(false)
|
||||
command: python3 /tmp/setup_fulcrum_ssl_tcp_monitor.py
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
|
|
@ -699,6 +720,7 @@
|
|||
when: tcp_monitor_setup.stdout is defined
|
||||
|
||||
- name: Clean up TCP monitor 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