From e9aef3468e5d5160759e0f27d3d6f7ca62c7e6b1 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 14 Mar 2025 12:02:15 +0100 Subject: [PATCH] Optimized .mds and meta/main.yml for systemd-notifier-email --- roles/systemd-notifier-email/README.md | 48 ++++++++-------------- roles/systemd-notifier-email/meta/main.yml | 25 +++++++++++ 2 files changed, 41 insertions(+), 32 deletions(-) create mode 100644 roles/systemd-notifier-email/meta/main.yml diff --git a/roles/systemd-notifier-email/README.md b/roles/systemd-notifier-email/README.md index 5c8e149e..4c9110e2 100644 --- a/roles/systemd-notifier-email/README.md +++ b/roles/systemd-notifier-email/README.md @@ -1,40 +1,24 @@ -# systemd-notifier-email Ansible Role - -Author: Kevin Veen-Birkenbach (kevin@veen.world) +# Automated Email Alerts for Service Failures ## Description -This Ansible role installs the necessary components for sending email notifications through systemd when any service fails. It configures the `systemd-notifier-email` service and handles the setup of email parameters and templates. +This role installs and configures the necessary components for sending email notifications via systemd when a service fails. It sets up the `systemd-notifier-email` service and configures email parameters and templates using msmtp. -Features include: +## Overview -- Installation and configuration of an email sending service. -- Customizable email templates for service failure notifications. +Optimized for secure and reliable service failure notifications, this role is an integral part of the overall `systemd-notifier` suite. It ensures that, upon failure of a critical service, an email alert is sent automatically to enable prompt troubleshooting. -This role is part of the `systemd-notifier` suite, which provides a comprehensive solution for service failure notifications in a systemd environment. +## 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 `systemd-notifier` suite, offering a unified approach to service failure notifications. + +## Further Information This role was created as part of a conversation with OpenAI's ChatGPT and can be found [here](https://chat.openai.com/share/96e4ca12-0888-41c0-9cfc-29c0180f0dba). - -## Requirements - -This role has the following requirements: - -- Access to an SMTP server for sending email notifications. -- Availability of the `msmtp` package on the target system. - -## Role Variables - -The following variables can be customized in the role's `vars/main.yml` file: - -- `systemd_notifier_email_folder`: The path to the folder where email-related scripts and configurations will be stored. - -## Usage - -To use this role, include it as a dependency in your playbook or role that requires email notifications. Ensure that the `systemd-notifier-email` role is correctly referenced and configured. - -## Contact Information - -For any questions or feedback, please contact the author: - -Author: Kevin Veen-Birkenbach -Email: kevin@veen.world \ No newline at end of file diff --git a/roles/systemd-notifier-email/meta/main.yml b/roles/systemd-notifier-email/meta/main.yml new file mode 100644 index 00000000..1b35a3fa --- /dev/null +++ b/roles/systemd-notifier-email/meta/main.yml @@ -0,0 +1,25 @@ +--- +galaxy_info: + author: "Kevin Veen-Birkenbach" + description: "Installs and configures components for sending email notifications through systemd using msmtp. This role is part of the systemd-notifier suite, providing automated alerts when services fail." + license: "CyMaIS NonCommercial License (CNCL)" + license_url: "https://s.veen.world/cncl" + company: | + Kevin Veen-Birkenbach + Consulting & Coaching Solutions + https://www.veen.world + min_ansible_version: "2.9" + platforms: + - name: Archlinux + versions: + - rolling + galaxy_tags: + - email + - systemd + - notifications + - automation + - msmtp + repository: "https://s.veen.world/cymais" + issue_tracker_url: "https://s.veen.world/cymaisissues" + documentation: "https://s.veen.world/cymais" +dependencies: []