2023-12-03 11:24:17 +01:00
|
|
|
- name: install smtp-forwarder
|
|
|
|
pacman: name=smtp-forwarder state=present
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_systemd_notifier_email is not defined
|
2023-12-03 11:24:17 +01:00
|
|
|
|
|
|
|
- name: configure msmtprc.conf.j2
|
2024-01-10 11:18:38 +01:00
|
|
|
template:
|
|
|
|
src: "msmtprc.conf.j2"
|
|
|
|
dest: "/root/.msmtprc"
|
2024-01-13 02:33:59 +01:00
|
|
|
mode: 600
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_systemd_notifier_email is not defined
|
2023-12-03 11:24:17 +01:00
|
|
|
|
|
|
|
- name: "create {{systemd_notifier_email_folder}}"
|
|
|
|
file:
|
|
|
|
path: "{{systemd_notifier_email_folder}}"
|
|
|
|
state: directory
|
|
|
|
mode: 0755
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_systemd_notifier_email is not defined
|
2023-12-03 11:24:17 +01:00
|
|
|
|
|
|
|
- name: configure systemd-notifier-email.sh
|
2024-01-10 11:18:38 +01:00
|
|
|
template:
|
|
|
|
src: systemd-notifier-email.sh.j2
|
|
|
|
dest: "{{systemd_notifier_email_folder}}systemd-notifier-email.sh"
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_systemd_notifier_email is not defined
|
2023-12-03 11:24:17 +01:00
|
|
|
|
2024-01-10 11:18:38 +01:00
|
|
|
- name: configure systemd-notifier-email.cymais.service
|
|
|
|
template:
|
|
|
|
src: systemd-notifier-email@.service.j2
|
|
|
|
dest: /etc/systemd/system/systemd-notifier-email.cymais@.service
|
2023-12-03 11:24:17 +01:00
|
|
|
notify: restart systemd-notifier-email service
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_systemd_notifier_email is not defined
|
|
|
|
|
|
|
|
- name: run the systemd_notifier_email tasks once
|
|
|
|
set_fact:
|
|
|
|
run_once_systemd_notifier_email: true
|
|
|
|
when: run_once_systemd_notifier_email is not defined
|