Only run docker compose down when project exists
Infrastructure / Check and run Ansbile playbooks (pull_request) Successful in 1m55s Details

This commit is contained in:
Gleb Koval 2024-03-30 01:33:24 +00:00
parent 94a836f135
commit 0e35264f2b
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
1 changed files with 5 additions and 0 deletions

View File

@ -8,7 +8,12 @@
ansible.builtin.wait_for_connection:
timeout: 300
- name: Check if project exists
ansible.builtin.stat:
path: "$HOME/{{ app }}"
register: project
- name: Docker compose down
when: project.stat.exists
community.docker.docker_compose_v2:
project_src: "$HOME/{{ app }}"
state: absent