From 1773d427612ecb87444ff28c5681440adc893613 Mon Sep 17 00:00:00 2001 From: Christian Steinle Date: Thu, 24 Apr 2025 11:05:21 +0200 Subject: [PATCH] Start backup of container volumes. --- minisforum.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/minisforum.yaml b/minisforum.yaml index 6577bc2..979c607 100644 --- a/minisforum.yaml +++ b/minisforum.yaml @@ -53,10 +53,13 @@ label: "{{ item[1].name }}" - name: Create backup of volume and store to backup directory - ansible.builtin.debug: - msg: - - '{{ item[1] }}' # Volume name - - '{{ item[0].name }}' # Container name + shell: | + docker stop {{ item[0].name }} + docker start {{ item[0].name }} + #ansible.builtin.debug: + # msg: + # - '{{ item[1] }}' # Volume name + # - '{{ item[0].name }}' # Container name loop: "{{ containers | subelements('volumes', skip_missing=True) }}" loop_control: label: "{{ item[1] }}"