From 32f7274e39728c695b37311ac3cec2e16b3c1132 Mon Sep 17 00:00:00 2001 From: Viyurz Date: Tue, 26 Mar 2024 18:43:35 +0100 Subject: [PATCH] Hedgedoc: Add missing backups tasks before updating container. --- roles/hedgedoc/tasks/update.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/hedgedoc/tasks/update.yml b/roles/hedgedoc/tasks/update.yml index d9ffe0b..2600d87 100644 --- a/roles/hedgedoc/tasks/update.yml +++ b/roles/hedgedoc/tasks/update.yml @@ -43,6 +43,12 @@ hedgedoc_pulled_images: "{{ hedgedoc_pulled_images | default([]) + [item.pulled_image.name] }}" loop: "{{ hedgedoc_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') }}" +- name: Include backup tasks + include_tasks: + file: backup.yml + # Make a backup if we didn't already make one and we pulled a new image + when: not run_backup and hedgedoc_pulled_images is defined + - name: Create/Restart project services community.docker.docker_compose: project_src: "{{ hedgedoc_project_dir }}"