diff --git a/odroid.yaml b/odroid.yaml index 5f807fb..075c5a0 100644 --- a/odroid.yaml +++ b/odroid.yaml @@ -139,18 +139,18 @@ find: paths: "{{ backup_dir }}/{{ item }}/daily" file_type: file - age: 1m + age: 8d age_stamp: ctime patterns: '*.gz' recurse: false - register: oldBackups + register: backup_files loop: "{{ systems }}" - name: Delete old daily backups file: path: "{{ item.path }}" state: absent - with_items: "{{ oldBackups.results | map(attribute='files') | list }}" + with_items: "{{ backup_files.results | map(attribute='files') | list }}" loop_control: label: "{{ item.path }}" @@ -162,14 +162,14 @@ age_stamp: ctime patterns: '*.gz' recurse: false - register: oldBackups + register: backup_files loop: "{{ systems }}" - name: Delete old weekly backups file: path: "{{ item.path }}" state: absent - with_items: "{{ oldBackups.results | map(attribute='files') | list }}" + with_items: "{{ backup_files.results | map(attribute='files') | list }}" loop_control: label: "{{ item.path }}" @@ -181,14 +181,14 @@ age_stamp: ctime patterns: '*.gz' recurse: false - register: oldBackups + register: backup_files loop: "{{ systems }}" - name: Delete old monthly backups file: path: "{{ item.path }}" state: absent - with_items: "{{ oldBackups.results | map(attribute='files') | list }}" + with_items: "{{ backup_files.results | map(attribute='files') | list }}" loop_control: label: "{{ item.path }}"