2023-12-03 11:24:17 +01:00
|
|
|
- name: install curl
|
|
|
|
pacman:
|
|
|
|
name: curl
|
|
|
|
state: present
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_systemd_notifier_telegram is not defined
|
2023-12-03 11:24:17 +01:00
|
|
|
|
|
|
|
- name: Create a directory with a subdirectory
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{systemd_telegram_folder}}"
|
|
|
|
state: directory
|
|
|
|
mode: '0755'
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_systemd_notifier_telegram is not defined
|
2023-12-03 11:24:17 +01:00
|
|
|
|
|
|
|
- name: configure systemd-notifier-telegram.sh
|
|
|
|
template:
|
|
|
|
src: systemd-notifier-telegram.sh.j2
|
|
|
|
dest: "{{ systemd_telegram_script }}"
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_systemd_notifier_telegram is not defined
|
2023-12-03 11:24:17 +01:00
|
|
|
|
2024-01-10 11:18:38 +01:00
|
|
|
- name: configure systemd-notifier-telegram.cymais.service
|
2023-12-03 11:24:17 +01:00
|
|
|
template:
|
|
|
|
src: systemd-notifier-telegram@.service.j2
|
2024-01-10 11:18:38 +01:00
|
|
|
dest: "/etc/systemd/system/systemd-notifier-telegram.cymais@.service"
|
2023-12-03 11:24:17 +01:00
|
|
|
notify: "restart systemd-notifier-telegram service"
|
2023-12-12 15:10:11 +01:00
|
|
|
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
|