Use date variable from parent playbook.

This commit is contained in:
2025-04-24 16:37:39 +02:00
parent bf8ab6e344
commit f772fcef36

View File

@@ -7,7 +7,7 @@
tasks:
- name: Fetch volume backups
fetch:
src: "{{ backup_location }}{{ item[0].name }}/{{ item[1] }}-volume-{{ ansible_date_time.iso8601_basic_short }}.tar.gz"
src: "{{ backup_location }}{{ item[0].name }}/{{ item[1] }}-volume-{{ date }}.tar.gz"
dest: "{{ local_backup }}{{ item[0].name }}/"
flat: yes
loop: "{{ containers | subelements('volumes', skip_missing=True) }}"
@@ -16,7 +16,7 @@
- name: Fetch database backups
fetch:
src: "{{ backup_location }}{{ item[0].name }}/{{ item[1].container }}-{{ ansible_date_time.iso8601_basic_short }}.sql"
src: "{{ backup_location }}{{ item[0].name }}/{{ item[1].container }}-{{ date }}.sql"
dest: "{{ local_backup }}{{ item[0].name }}/"
flat: yes
loop: "{{ containers | subelements('database', skip_missing=True) }}"