Fix role.state:absent
This commit is contained in:
parent
a426b4a2e5
commit
0e63672dec
@ -1,11 +1,18 @@
|
||||
---
|
||||
- name: Check if service is present
|
||||
stat:
|
||||
path: "{{ service_dir | mandatory }}"
|
||||
register: dir
|
||||
|
||||
- name: Stop Service
|
||||
community.docker.docker_compose:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user