Correct usage of dict lookup when backing up volumes.
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
label: "{{ item.item }}"
|
||||
|
||||
- name: Backup container volumes
|
||||
shell: docker run --rm -v {{ backup_dir }}/{{ item.key }}:/backup --volumes-from {{ item.container }} busybox tar cvfz /backup/gitea.tar.gz {{ item.path }}
|
||||
shell: docker run --rm -v {{ backup_dir }}/{{ item.key }}:/backup --volumes-from {{ item.value.container }} busybox tar cvfz /backup/gitea.tar.gz {{ item.value.path }}
|
||||
loop: "{{ lookup('dict', volumes) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
Reference in New Issue
Block a user