ansible-edda/playbooks/roles/system/base/tasks/include/systemd_mail.yml

34 lines
1.1 KiB
YAML
Raw Normal View History

2022-12-18 23:43:40 +01:00
---
2022-12-04 17:24:00 +01:00
- name: "systemd_mail : systemd mail root script"
ansible.builtin.template:
2022-12-04 17:24:00 +01:00
src: "./systemd_mail/system/systemd-mail-systemctl-status.j2"
dest: "/usr/local/sbin/systemd-mail-systemctl-status"
mode: 0755
2022-12-04 17:24:00 +01:00
- name: "systemd_mail : systemd mail user script"
ansible.builtin.template:
2022-12-04 17:24:00 +01:00
src: "./systemd_mail/user/systemd-mail-systemctl-status.j2"
dest: "/usr/local/bin/systemd-mail-systemctl-status"
mode: 0755
2022-12-04 17:24:00 +01:00
- name: "systemd_mail : systemd mail root service"
ansible.builtin.copy:
2022-12-04 17:24:00 +01:00
src: "./systemd_mail/system/status-mail@.service"
dest: "/etc/systemd/system/status-mail@.service"
mode: 0644
2022-12-08 23:19:54 +01:00
register: system_base_system_status_mail_service_file
2022-12-04 17:24:00 +01:00
- name: "systemd_mail : systemd mail user service"
ansible.builtin.copy:
2022-12-04 17:24:00 +01:00
src: "./systemd_mail/user/status-mail@.service"
dest: "/etc/systemd/user/status-mail@.service"
mode: 0644
2022-12-08 23:19:54 +01:00
register: system_base_user_status_mail_service_file
2022-12-04 17:24:00 +01:00
- name: "systemd_mail : systemd daemon reload"
ansible.builtin.systemd:
daemon_reload: true
when:
2022-12-08 23:19:54 +01:00
system_base_system_status_mail_service_file.changed or
system_base_user_status_mail_service_file.changed