Optimized alarm and system handlers

This commit is contained in:
2025-08-20 14:58:11 +02:00
parent 42d6c1799b
commit f4a380d802
8 changed files with 26 additions and 10 deletions

View File

@@ -12,6 +12,10 @@
- include_role:
name: sys-service
vars:
# If the Telegram notifier fails, trigger the Email notifier,
# passing the failing unit's name as the instance text.
system_service_tpl_on_failure: "{{ ('sys-ctl-alm-email@') | get_service_name(SOFTWARE_NAME, False) }}%n.service"
- name: install curl
community.general.pacman:

View File

@@ -15,4 +15,4 @@ fi
/usr/bin/curl -s -X POST \
"https://api.telegram.org/bot{{ telegram_bot_token }}/sendMessage" \
-d chat_id="{{ telegram_chat_id }}" \
--data-urlencode text="service ${friendly} on ${host} failed"
--data-urlencode text="service ${friendly//\//-} on ${host} failed"