Collect weekly backups on monday.
This commit is contained in:
@@ -113,7 +113,7 @@
|
|||||||
src: "{{ item.path }}"
|
src: "{{ item.path }}"
|
||||||
dest: "{{ item.path | dirname }}/weekly/{{ item.path | basename }}"
|
dest: "{{ item.path | dirname }}/weekly/{{ item.path | basename }}"
|
||||||
with_items: "{{ backup_files.results | map(attribute='files') | list }}"
|
with_items: "{{ backup_files.results | map(attribute='files') | list }}"
|
||||||
when: (ansible_date_time.weekday_number == "7")
|
when: (ansible_date_time.weekday_number == "1")
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.path }}"
|
label: "{{ item.path }}"
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
src: "{{ item.path }}"
|
src: "{{ item.path }}"
|
||||||
dest: "{{ item.path | dirname }}/daily/{{ item.path | basename }}"
|
dest: "{{ item.path | dirname }}/daily/{{ item.path | basename }}"
|
||||||
with_items: "{{ backup_files.results | map(attribute='files') | list }}"
|
with_items: "{{ backup_files.results | map(attribute='files') | list }}"
|
||||||
when: (ansible_date_time.weekday_number != "7" and ansible_date_time.day != "01")
|
when: (ansible_date_time.weekday_number != "1" and ansible_date_time.day != "01")
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.path }}"
|
label: "{{ item.path }}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user