Optimized .mds and meta/main.yml for systemd-notifier-telegram

This commit is contained in:
Kevin Veen-Birkenbach 2025-03-14 12:09:17 +01:00
parent e9aef3468e
commit d4850ec8bb
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
2 changed files with 40 additions and 28 deletions

View File

@ -1,37 +1,24 @@
# Automated Telegram Alerts for Service Failures
## Description
This Ansible role installs the necessary components for sending Telegram notifications through systemd when any service fails. It configures the `systemd-notifier-telegram` service and handles the setup of Telegram bot parameters and notification templates.
This role installs and configures the necessary components for sending notifications via systemd when a service fails. It sets up the `systemd-notifier-telegram` service and configures parameters and customizable templates for sending messages through [Telegram](https://telegram.org).
Features include:
## Overview
- Installation and configuration of a Telegram notifier service.
- Customizable templates for Telegram messages sent on service failure.
Optimized for real-time alerts, this role is a key component of the overall [`systemd-notifier` suite](../). It ensures that, upon failure of a critical service, a Telegram message is automatically sent to notify administrators and 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
## Requirements
The primary purpose of this role is to provide a robust solution for automated Telegram notifications in a systemd environment. By integrating with Telegrams Bot API and using customizable message templates, it delivers clear and timely alerts about service failures, thereby enhancing system observability and reliability.
This role has the following requirements:
## Features
- Access to a Telegram bot token for sending messages.
- Availability of the `curl` package on the target system.
- **Service Installation & Configuration:** Installs and configures necessary components (including the `curl` package).
- **Customizable Templates:** Supports tailored Telegram message templates for service failure notifications.
- **Secure Notifications:** Leverages systemd to trigger alerts automatically when services fail.
- **Suite Integration:** Part of the [`systemd-notifier` suite](../) which includes related roles such as [systemd-notifier-email](../systemd-notifier-email/README.md) and others.
## Further Information
## Role Variables
The following variables can be customized in the role's `vars/main.yml` file:
- `systemd_telegram_folder`: The path to the folder where Telegram-related scripts and configurations will be stored.
- `systemd_telegram_script`: The full path to the systemd-telegram.sh script.
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).
## Usage
To use this role, include it as a dependency in your playbook or role that requires Telegram notifications. Ensure that the `systemd-notifier-telegram` 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
This role was developed as part of a conversation with OpenAI's ChatGPT and can be found [here](https://chat.openai.com/share/96e4ca12-0888-41c0-9cfc-29c0180f0dba).

View File

@ -0,0 +1,25 @@
---
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Installs and configures components for sending Telegram notifications through systemd. 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:
- telegram
- systemd
- notifications
- automation
- curl
repository: "https://s.veen.world/cymais"
issue_tracker_url: "https://s.veen.world/cymaisissues"
documentation: "https://s.veen.world/cymais"
dependencies: []