2022-10-30 02:31:21 +01:00
|
|
|
---
|
2023-02-28 20:17:23 +01:00
|
|
|
- name: Check if service is present
|
|
|
|
stat:
|
|
|
|
path: "{{ service_dir | mandatory }}"
|
|
|
|
register: dir
|
|
|
|
|
2022-10-30 02:31:21 +01:00
|
|
|
- name: Stop Service
|
|
|
|
community.docker.docker_compose:
|
|
|
|
project_src: "{{ service_dir | mandatory }}"
|
|
|
|
state: absent
|
|
|
|
remove_orphans: true
|
2023-02-28 20:17:23 +01:00
|
|
|
when: dir.stat.exists == True
|
2022-10-30 02:31:21 +01:00
|
|
|
|
|
|
|
- name: Remove Service
|
|
|
|
file:
|
|
|
|
state: absent
|
|
|
|
path: "{{ service_dir | mandatory }}"
|
2023-02-28 20:17:23 +01:00
|
|
|
when: dir.stat.exists == True
|