@ -30,8 +30,14 @@
|
||||
src: "{{ role_path }}/templates/systemd/matrix-mailer.service.j2"
|
||||
dest: "/etc/systemd/system/matrix-mailer.service"
|
||||
mode: 0644
|
||||
register: matrix_mailer_systemd_service_result
|
||||
when: matrix_mailer_enabled
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-mailer.service installation
|
||||
service:
|
||||
daemon_reload: yes
|
||||
when: "matrix_mailer_enabled and matrix_mailer_systemd_service_result.changed"
|
||||
|
||||
#
|
||||
# Tasks related to getting rid of the mailer (if it was previously enabled)
|
||||
#
|
||||
@ -55,6 +61,11 @@
|
||||
state: absent
|
||||
when: "not matrix_mailer_enabled and matrix_mailer_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-mailer.service removal
|
||||
service:
|
||||
daemon_reload: yes
|
||||
when: "not matrix_mailer_enabled and matrix_mailer_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure Matrix mailer environment variables path doesn't exist
|
||||
file:
|
||||
path: "{{ matrix_mailer_base_path }}"
|
||||
|
Reference in New Issue
Block a user