2020-05-22 11:50:59 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Check existence of matrix-sms-bridge service
|
|
|
|
stat:
|
|
|
|
path: "{{ matrix_systemd_path }}/matrix-sms-bridge.service"
|
|
|
|
register: matrix_sms_bridge_service_stat
|
|
|
|
|
|
|
|
- name: Ensure matrix-sms-bridge is stopped
|
2022-07-18 07:39:08 +00:00
|
|
|
ansible.builtin.service:
|
2020-05-22 11:50:59 +00:00
|
|
|
name: matrix-sms-bridge
|
|
|
|
state: stopped
|
2022-02-05 20:32:54 +00:00
|
|
|
enabled: false
|
|
|
|
daemon_reload: true
|
2020-05-22 11:50:59 +00:00
|
|
|
when: "matrix_sms_bridge_service_stat.stat.exists"
|
|
|
|
|
|
|
|
- name: Ensure matrix-sms-bridge.service doesn't exist
|
2022-07-18 07:39:08 +00:00
|
|
|
ansible.builtin.file:
|
2020-05-22 11:50:59 +00:00
|
|
|
path: "{{ matrix_systemd_path }}/matrix-sms-bridge.service"
|
|
|
|
state: absent
|
2021-11-10 15:39:21 +00:00
|
|
|
when: "matrix_sms_bridge_service_stat.stat.exists"
|