Rework storing of daily backups.

This commit is contained in:
2021-11-19 11:47:11 +01:00
parent e889410057
commit 42e9aa2515

View File

@@ -112,7 +112,10 @@
loop: "{{ systems }}"
- name: Store the daily backup
debug: var="{{ item.path | dirname }}"
copy:
remote_src: true
src: "{{ item.path }}"
dest: "{{ item.path | dirname }}/daily/{{ item.path | basename }}"
with_items: "{{ backup_files.results | map(attribute='files') | list }}"
when: (ansible_date_time.weekday_number != "7" and ansible_date_time.day != "01")