Search for new backup files to be moved.
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
group: chris
|
||||
recurse: yes
|
||||
|
||||
|
||||
- name: Register new backup directories
|
||||
find:
|
||||
paths: "{{ backup_dir }}"
|
||||
@@ -50,3 +49,14 @@
|
||||
- ['daily', 'weekly', 'monthly', 'yearly']
|
||||
loop_control:
|
||||
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