Search for new backup files to be moved.
This commit is contained in:
@@ -33,7 +33,6 @@
|
|||||||
group: chris
|
group: chris
|
||||||
recurse: yes
|
recurse: yes
|
||||||
|
|
||||||
|
|
||||||
- name: Register new backup directories
|
- name: Register new backup directories
|
||||||
find:
|
find:
|
||||||
paths: "{{ backup_dir }}"
|
paths: "{{ backup_dir }}"
|
||||||
@@ -50,3 +49,14 @@
|
|||||||
- ['daily', 'weekly', 'monthly', 'yearly']
|
- ['daily', 'weekly', 'monthly', 'yearly']
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item[0].path }} {{ item[1] }}"
|
label: "{{ item[0].path }} {{ item[1] }}"
|
||||||
|
|
||||||
|
- name: Search for the created backups
|
||||||
|
find:
|
||||||
|
paths: "{{ item.path }}"
|
||||||
|
file_type: file
|
||||||
|
patterns: '*.gz'
|
||||||
|
recurse: false
|
||||||
|
register: backup_files
|
||||||
|
loop: "{{ backup_dirs.files }}"
|
||||||
|
|
||||||
|
- debug: var=backup_files
|
||||||
|
|||||||
Reference in New Issue
Block a user