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

33 lines
1.1 KiB
YAML

- name: "systemd_mail : systemd mail root script"
ansible.builtin.template:
src: "./systemd_mail/system/systemd-mail-systemctl-status.j2"
dest: "/usr/local/sbin/systemd-mail-systemctl-status"
mode: 0755
- name: "systemd_mail : systemd mail user script"
ansible.builtin.template:
src: "./systemd_mail/user/systemd-mail-systemctl-status.j2"
dest: "/usr/local/bin/systemd-mail-systemctl-status"
mode: 0755
- name: "systemd_mail : systemd mail root service"
ansible.builtin.copy:
src: "./systemd_mail/system/status-mail@.service"
dest: "/etc/systemd/system/status-mail@.service"
mode: 0644
register: system_base_system_status_mail_service_file
- name: "systemd_mail : systemd mail user service"
ansible.builtin.copy:
src: "./systemd_mail/user/status-mail@.service"
dest: "/etc/systemd/user/status-mail@.service"
mode: 0644
register: system_base_user_status_mail_service_file
- name: "systemd_mail : 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