Refactor alarm compose service and systemctl templates

- Fixed bug where not both alarm services (email + telegram) were triggered.
- Removed direct OnFailure references for email and telegram,
  now handled by unified compose service.
- Introduced 01_core.yml in sys-ctl-alm-compose to structure
  role execution (subservices → core service → test run).
- Added configurable variables SYSTEMCTL_ALARM_COMPOSER_SUBSERVICES
  and SYSTEMCTL_ALARM_COMPOSER_DUMMY_MESSAGE.
- Replaced dedicated @.service template with generic systemctl template
  using systemctl_tpl_* variables for flexibility.
- Updated script.sh.j2 to collect exit codes and print clear errors.
- Fixed typos and streamlined vars in sys-systemctl.

See conversation: https://chatgpt.com/share/68a46172-7c3c-800f-a69c-0cb9edd6839f
This commit is contained in:
2025-08-19 13:35:39 +02:00
parent b1e8339283
commit b49fdc509e
8 changed files with 55 additions and 30 deletions

View File

@@ -17,8 +17,6 @@ SYS_SERVICE_UPDATE_DOCKER: "{{ 'update-docker' | get_servic
## On Failure
SYS_SERVICE_ON_FAILURE_COMPOSE: "{{ 'sys-ctl-alm-compose' | get_service_name(SOFTWARE_NAME,'%i.service') }}"
SYS_SERVICE_ON_FAILURE_EMAIL: "{{ 'sys-ctl-alm-email' | get_service_name(SOFTWARE_NAME,'%i.service') }}"
SYS_SERVICE_ON_FAILURE_TELEGRAM: "{{ 'sys-ctl-alm-telegram' | get_service_name(SOFTWARE_NAME,'%i.service') }}"
## Groups
SYS_SERVICE_GROUP_BACKUPS: >