- Replace legacy utils/run_once.yml with the new helpers utils/once_flag.yml and utils/once_finalize.yml - Introduce utils/compose_up.yml to ensure docker-compose stacks are up and to flush handlers safely without coupling to run-once flags - Migrate all affected roles (desk-*, dev-*, sys-ctl-*, sys-svc-*, web-app-*, web-svc-*, util-*) to the new run-once helpers - Rework sys-svc-msmtp to auto-load Mailu once per deploy, check reachability, and reuse the running stack instead of requiring multiple playbook passes - Adjust web-app-mailu to integrate cert deployment, handler flushing, and run-once handling so Mailu is fully initialized in a single deploy - Improve Matomo, CDN, logout and CSP/health-check related roles to cooperate with the new compose_up / once_* pattern - Simplify alarm/backup/timer/service orchestration (sys-ctl-alm-*, sys-bkp-provider, sys-timer-cln-bkps, etc.) by moving run-once logic into dedicated 01_core.yml files - Update integration tests so utils/once_flag.yml and utils/once_finalize.yml are recognised as valid run-once providers, keeping the global run_once_* guarantees consistent - Align frontend injection and service dependencies so Mastodon- and Mailu-related services can be brought up coherently within a single deployment cycle rather than several iterations
Automated Email Alerts for Service Failures
Description
This role installs and configures the necessary components for sending email notifications via systemd when a service fails. It sets up the {{ system_service_id }} service and configures email parameters and templates using msmtp.
Overview
Optimized for secure and reliable service failure notifications, this role is an integral part of the overall sys-ctl-alm-compose suite. It ensures that, upon failure of a critical service, an email alert is sent automatically to enable prompt troubleshooting.
Purpose
The primary purpose of this role is to provide a comprehensive solution for automated email notifications in a systemd environment. By integrating with msmtp and customizable templates, it delivers clear and timely alerts about service failures, thereby enhancing system reliability.
Features
- Service Installation & Configuration: Installs msmtp and configures the email sending service.
- Customizable Templates: Supports tailoring email templates for service failure notifications.
- Secure Notifications: Integrates with systemd to trigger email alerts when services fail.
- Suite Integration: Part of the
sys-ctl-alm-composesuite, offering a unified approach to service failure notifications.
Other Resources
This role was created as part of a conversation with OpenAI's ChatGPT and can be found here.