Changed systemd-notifier namings

This commit is contained in:
2023-12-03 11:24:17 +01:00
parent d3de68b216
commit 3120b23eb4
41 changed files with 93 additions and 93 deletions

View File

@@ -0,0 +1,37 @@
# systemd-notifier Ansible Role
Author: Kevin Veen-Birkenbach (kevin@veen.world)
## Description
This Ansible role installs a systemd service that sends notifications via both `systemd-notifier-telegram` and `systemd-notifier-email` when any service fails.
Features include:
- Configuration of a systemd service for notification.
- Dependency management for the `systemd-notifier-telegram` and `systemd-notifier-email` roles.
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).
## License
This Ansible role is licensed under the AGPL v3 License. See the LICENSE file for the full license text.
## Role Dependencies
This role has the following dependencies:
- `systemd-notifier-telegram`
- `systemd-notifier-email`
## Features
- Installs a systemd service for sending notifications.
- Integrates with both Telegram and Email for notification delivery.
## Contact Information
For any questions or feedback, please contact the author:
Author: Kevin Veen-Birkenbach
Email: kevin@veen.world

View File

@@ -0,0 +1,4 @@
- name: "restart systemd-notifier service"
systemd:
name: systemd-notifier.service
daemon_reload: yes

View File

@@ -0,0 +1,4 @@
---
dependencies:
- role: systemd-notifier-telegram
- role: systemd-notifier-email

View File

@@ -0,0 +1,6 @@
---
- name: configure systemd-notifier@.service
template:
src: systemd-notifier@.service.j2
dest: "/etc/systemd/system/systemd-notifier@.service"
notify: "restart systemd-notifier service"

View File

@@ -0,0 +1,8 @@
[Unit]
Description=Notifier for %i
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl start systemd-notifier-telegram@%i.service systemd-notifier-email@%i.service
User=root
Group=systemd-journal