2023-07-12 06:09:27 +00:00
|
|
|
---
|
|
|
|
|
2023-07-14 02:16:07 +00:00
|
|
|
- name: Check existence of media-repo service
|
2023-07-12 06:09:27 +00:00
|
|
|
ansible.builtin.stat:
|
2023-07-14 02:16:07 +00:00
|
|
|
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_media_repo_identifier }}.service"
|
2023-07-12 06:09:27 +00:00
|
|
|
register: matrix_media_repo_service_stat
|
|
|
|
|
|
|
|
- when: matrix_media_repo_service_stat.stat.exists | bool
|
|
|
|
block:
|
2023-07-14 02:16:07 +00:00
|
|
|
- name: Ensure media-repo is stopped
|
2023-07-12 06:09:27 +00:00
|
|
|
ansible.builtin.systemd:
|
2023-07-14 02:16:07 +00:00
|
|
|
name: "{{ matrix_media_repo_identifier }}"
|
2023-07-12 06:09:27 +00:00
|
|
|
state: stopped
|
|
|
|
daemon_reload: true
|
|
|
|
|
2023-07-14 02:16:07 +00:00
|
|
|
- name: Ensure media-repo service doesn't exist
|
2023-07-12 06:09:27 +00:00
|
|
|
ansible.builtin.file:
|
2023-07-14 02:16:07 +00:00
|
|
|
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_media_repo_identifier }}.service"
|
2023-07-12 06:09:27 +00:00
|
|
|
state: absent
|