34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
---
|
|
- name: "systemd mail root script"
|
|
ansible.builtin.template:
|
|
src: "./system/systemd-mail-systemctl-status.j2"
|
|
dest: "/usr/local/sbin/systemd-mail-systemctl-status"
|
|
mode: 0755
|
|
|
|
- name: "systemd mail user script"
|
|
ansible.builtin.template:
|
|
src: "./user/systemd-mail-systemctl-status.j2"
|
|
dest: "/usr/local/bin/systemd-mail-systemctl-status"
|
|
mode: 0755
|
|
|
|
- name: "systemd mail root service"
|
|
ansible.builtin.copy:
|
|
src: "./system/status-mail@.service"
|
|
dest: "/etc/systemd/system/status-mail@.service"
|
|
mode: 0644
|
|
register: system_base_system_status_mail_service_file
|
|
|
|
- name: "systemd mail user service"
|
|
ansible.builtin.copy:
|
|
src: "./user/status-mail@.service"
|
|
dest: "/etc/systemd/user/status-mail@.service"
|
|
mode: 0644
|
|
register: system_base_user_status_mail_service_file
|
|
|
|
- name: "systemd daemon reload"
|
|
ansible.builtin.systemd:
|
|
daemon_reload: true
|
|
when:
|
|
system_base_system_status_mail_service_file.changed or
|
|
system_base_user_status_mail_service_file.changed
|