mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-07 18:57:12 +02:00
Optimized tests für run once
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
description: "Installs and configures components for sending Telegram notifications through systemd. This role is part of the sys-alm-compose suite, providing automated alerts when services fail."
|
||||
@@ -10,17 +9,15 @@ galaxy_info:
|
||||
https://www.veen.world
|
||||
min_ansible_version: "2.9"
|
||||
platforms:
|
||||
- name: Archlinux
|
||||
versions:
|
||||
- rolling
|
||||
- name: Archlinux
|
||||
versions:
|
||||
- rolling
|
||||
galaxy_tags:
|
||||
- telegram
|
||||
- systemd
|
||||
- notifications
|
||||
- automation
|
||||
- curl
|
||||
- telegram
|
||||
- systemd
|
||||
- notifications
|
||||
- automation
|
||||
- curl
|
||||
repository: "https://github.com/kevinveenbirkenbach/infinito-nexus"
|
||||
issue_tracker_url: "https://github.com/kevinveenbirkenbach/infinito-nexus/issues"
|
||||
documentation: "https://docs.infinito.nexus"
|
||||
dependencies:
|
||||
- sys-rst-daemon
|
||||
|
@@ -1,8 +1,16 @@
|
||||
- name: Load former meta dependencies once
|
||||
block:
|
||||
- name: Include moved dependency 'sys-rst-daemon'
|
||||
include_role:
|
||||
name: sys-rst-daemon
|
||||
- set_fact:
|
||||
run_once_sys_alm_telegram: true
|
||||
when: run_once_sys_alm_telegram is not defined
|
||||
- name: Fail if Telegram bot credentials are not set
|
||||
assert:
|
||||
that:
|
||||
- telegram_bot_token != ""
|
||||
- telegram_chat_id != ""
|
||||
- telegram_bot_token != ""
|
||||
- telegram_chat_id != ""
|
||||
fail_msg: |
|
||||
Telegram configuration is incomplete!
|
||||
Please provide non‑empty values for:
|
||||
@@ -10,7 +18,7 @@
|
||||
- telegram_chat_id # The Telegram chat ID to send messages to
|
||||
|
||||
- name: install curl
|
||||
community.general.pacman:
|
||||
community.general.pacman:
|
||||
name: curl
|
||||
state: present
|
||||
|
||||
@@ -21,12 +29,12 @@
|
||||
mode: '0755'
|
||||
|
||||
- name: configure sys-alm-telegram.sh
|
||||
template:
|
||||
src: sys-alm-telegram.sh.j2
|
||||
template:
|
||||
src: sys-alm-telegram.sh.j2
|
||||
dest: "{{ systemd_telegram_script }}"
|
||||
|
||||
- name: configure sys-alm-telegram.infinito.service
|
||||
template:
|
||||
src: sys-alm-telegram@.service.j2
|
||||
template:
|
||||
src: sys-alm-telegram@.service.j2
|
||||
dest: "/etc/systemd/system/sys-alm-telegram.infinito@.service"
|
||||
notify: "restart sys-alm-telegram service"
|
||||
|
Reference in New Issue
Block a user