From 87cef9c1beeae1aaa531e795046b15bf03d5f4c7 Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Sat, 30 Mar 2024 01:34:02 +0000 Subject: [PATCH] Fix #53: New docker compose down in Ansible fix (#58) Only run docker compose down when project files exist. Reviewed-on: https://git.koval.net/cyclane/kovalhome/pulls/58 --- infra/finance/0003_firefly-iii_playbook.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/infra/finance/0003_firefly-iii_playbook.yaml b/infra/finance/0003_firefly-iii_playbook.yaml index b5a2d92..5386c4f 100644 --- a/infra/finance/0003_firefly-iii_playbook.yaml +++ b/infra/finance/0003_firefly-iii_playbook.yaml @@ -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