From c2fe8a95c0b9c4b204f4b5b8f0c9e222c1c26f34 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 24 Dec 2023 22:50:00 +0100 Subject: [PATCH] changed backup procedure --- roles/docker-openproject/tasks/main.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/roles/docker-openproject/tasks/main.yml b/roles/docker-openproject/tasks/main.yml index 322c65ef..06474f4f 100644 --- a/roles/docker-openproject/tasks/main.yml +++ b/roles/docker-openproject/tasks/main.yml @@ -9,12 +9,23 @@ removes: "{{ docker_compose_file_path }}" become: true +- name: register directory + stat: + path: "{{docker_compose_instance_directory}}" + register: docker_compose_instance_directory_register + +- name: checkout repository + ansible.builtin.shell: git checkout . + become: true + args: + chdir: "{{docker_compose_instance_directory}}" + when: docker_compose_instance_directory_register.stat.exists + - name: pull docker repository git: repo: "https://github.com/opf/openproject-deploy" dest: "{{ repository_directory }}" update: yes - force: yes notify: recreate openproject become: true register: git_result