mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-24 05:25:56 +00:00
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
|
---
|
||
|
|
||
|
- name: Check existence of matrix-wechat service
|
||
|
ansible.builtin.stat:
|
||
|
path: "/etc/systemd/system/matrix-wechat.service"
|
||
|
register: matrix_wechat_service_stat
|
||
|
|
||
|
- when: matrix_wechat_service_stat.stat.exists | bool
|
||
|
block:
|
||
|
- name: Ensure matrix-wechat is stopped
|
||
|
ansible.builtin.service:
|
||
|
name: matrix-wechat
|
||
|
state: stopped
|
||
|
enabled: false
|
||
|
daemon_reload: true
|
||
|
|
||
|
- name: Ensure matrix-wechat.service doesn't exist
|
||
|
ansible.builtin.file:
|
||
|
path: "/etc/systemd/system/matrix-wechat.service"
|
||
|
state: absent
|
||
|
|
||
|
- name: Check existence of matrix-wechat-agent service
|
||
|
ansible.builtin.stat:
|
||
|
path: "/etc/systemd/system/matrix-wechat-agent.service"
|
||
|
register: matrix_wechat_agent_service_stat
|
||
|
|
||
|
- when: matrix_wechat_agent_service_stat.stat.exists | bool
|
||
|
block:
|
||
|
- name: Ensure matrix-wechat-agent is stopped
|
||
|
ansible.builtin.service:
|
||
|
name: matrix-wechat-agent
|
||
|
state: stopped
|
||
|
enabled: false
|
||
|
daemon_reload: true
|
||
|
|
||
|
- name: Ensure matrix-wechat-agent.service doesn't exist
|
||
|
ansible.builtin.file:
|
||
|
path: "/etc/systemd/system/matrix-wechat-agent.service"
|
||
|
state: absent
|