You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
2 years ago
|
---
|
||
|
|
||
|
- name: Check existence of matrix-maubot service
|
||
2 years ago
|
ansible.builtin.stat:
|
||
2 years ago
|
path: "{{ matrix_systemd_path }}/matrix-bot-maubot.service"
|
||
2 years ago
|
register: matrix_bot_maubot_service_stat
|
||
2 years ago
|
|
||
2 years ago
|
- name: Ensure matrix-bot-maubot is stopped
|
||
2 years ago
|
ansible.builtin.service:
|
||
2 years ago
|
name: matrix-bot-maubot
|
||
2 years ago
|
state: stopped
|
||
|
enabled: false
|
||
|
daemon_reload: true
|
||
|
register: stopping_result
|
||
2 years ago
|
when: "matrix_bot_maubot_service_stat.stat.exists | bool"
|
||
2 years ago
|
|
||
2 years ago
|
- name: Ensure matrix-bot-maubot.service doesn't exist
|
||
2 years ago
|
ansible.builtin.file:
|
||
2 years ago
|
path: "{{ matrix_systemd_path }}/matrix-bot-maubot.service"
|
||
2 years ago
|
state: absent
|
||
2 years ago
|
when: "matrix_bot_maubot_service_stat.stat.exists | bool"
|
||
2 years ago
|
|
||
2 years ago
|
- name: Ensure systemd reloaded after matrix-bot-maubot.service removal
|
||
2 years ago
|
ansible.builtin.service:
|
||
2 years ago
|
daemon_reload: true
|
||
2 years ago
|
when: "matrix_bot_maubot_service_stat.stat.exists | bool"
|
||
2 years ago
|
|
||
|
- name: Ensure Matrix maubot paths don't exist
|
||
2 years ago
|
ansible.builtin.file:
|
||
2 years ago
|
path: "{{ matrix_bot_maubot_base_path }}"
|
||
2 years ago
|
state: absent
|
||
|
|
||
|
- name: Ensure maubot Docker image doesn't exist
|
||
2 years ago
|
community.docker.docker_image:
|
||
2 years ago
|
name: "{{ matrix_bot_maubot_docker_image }}"
|
||
2 years ago
|
state: absent
|