2023-05-05 22:19:15 +02:00
|
|
|
---
|
|
|
|
- name: Check if service is present
|
|
|
|
stat:
|
|
|
|
path: "{{ service_dir | mandatory }}"
|
|
|
|
register: dir
|
|
|
|
|
|
|
|
- name: Stop Service
|
2024-01-22 14:35:23 +01:00
|
|
|
community.docker.docker_compose_v2:
|
2023-05-05 22:19:15 +02:00
|
|
|
project_src: "{{ service_dir | mandatory }}"
|
|
|
|
state: absent
|
|
|
|
remove_orphans: true
|
|
|
|
when: dir.stat.exists == True
|
|
|
|
|
|
|
|
- name: Remove Service
|
|
|
|
file:
|
|
|
|
state: absent
|
|
|
|
path: "{{ service_dir | mandatory }}"
|
|
|
|
when: dir.stat.exists == True
|