1
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2024-12-12 08:43:55 +02:00
matrix-docker-ansible-deploy/roles/custom/matrix-user-verification-service/tasks/setup_uninstall.yml
Jakob S 6913d368c8
Consolidate conditionals into a block, keep image
Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2023-02-06 12:38:01 +01:00

26 lines
941 B
YAML

---
- name: Check existence of matrix-user-verification-service service
stat:
path: "{{ matrix_systemd_path }}/{{ matrix_user_verification_service_systemd_service_name }}"
register: matrix_user_verification_service_service_stat
- when: matrix_user_verification_service_service_stat.stat.exists | bool
block:
- name: Ensure matrix-user-verification-service is stopped
service:
name: "{{ matrix_user_verification_service_systemd_service_basename }}"
state: stopped
daemon_reload: yes
register: stopping_result
- name: Ensure matrix-user-verification-service.service doesn't exist
file:
path: "{{ matrix_systemd_path }}/{{ matrix_user_verification_service_systemd_service_name }}"
state: absent
- name: Ensure Matrix user-verification-service paths don't exist
file:
path: "{{ matrix_user_verification_service_base_path }}"
state: absent