ansible-edda/playbooks/tasks/hosts/systemd-mail.yml

33 lines
1.0 KiB
YAML
Raw Normal View History

- name: SystemD mail root script
2022-09-11 20:55:30 +02:00
template:
src: ./filesystem/common/usr/local/sbin/systemd-mail-systemctl-status.j2
2022-09-11 20:55:30 +02:00
dest: /usr/local/sbin/systemd-mail-systemctl-status
mode: 0755
- name: SystemD mail user script
template:
src: ./filesystem/common/usr/local/bin/systemd-mail-systemctl-status.j2
dest: /usr/local/bin/systemd-mail-systemctl-status
mode: 0755
- name: SystemD mail root service
2022-09-11 20:55:30 +02:00
copy:
src: ./filesystem/common/etc/systemd/system/status-mail@.service
2022-09-11 20:55:30 +02:00
dest: /etc/systemd/system/status-mail@.service
mode: 0644
register: systemd_system_status_mail_service_file
- name: SystemD mail user service
copy:
src: ./filesystem/common/etc/systemd/user/status-mail@.service
dest: /etc/systemd/user/status-mail@.service
mode: 0644
register: systemd_user_status_mail_service_file
2022-09-11 20:55:30 +02:00
- name: SystemD daemon reload
systemd:
daemon_reload: true
when:
systemd_system_status_mail_service_file is changed or
systemd_user_status_mail_service_file is changed