mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
30
roles/alert-telegram/tasks/main.yml
Normal file
30
roles/alert-telegram/tasks/main.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
- name: install curl
|
||||
pacman:
|
||||
name: curl
|
||||
state: present
|
||||
when: run_once_systemd_notifier_telegram is not defined
|
||||
|
||||
- name: Create a directory with a subdirectory
|
||||
ansible.builtin.file:
|
||||
path: "{{systemd_telegram_folder}}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
when: run_once_systemd_notifier_telegram is not defined
|
||||
|
||||
- name: configure alert-telegram.sh
|
||||
template:
|
||||
src: alert-telegram.sh.j2
|
||||
dest: "{{ systemd_telegram_script }}"
|
||||
when: run_once_systemd_notifier_telegram is not defined
|
||||
|
||||
- name: configure alert-telegram.cymais.service
|
||||
template:
|
||||
src: alert-telegram@.service.j2
|
||||
dest: "/etc/systemd/system/alert-telegram.cymais@.service"
|
||||
notify: "restart alert-telegram service"
|
||||
when: run_once_systemd_notifier_telegram is not defined
|
||||
|
||||
- name: run the systemd_notifier_telegram tasks once
|
||||
set_fact:
|
||||
run_once_systemd_notifier_telegram: true
|
||||
when: run_once_systemd_notifier_telegram is not defined
|
Reference in New Issue
Block a user