From be0167fd49af5a8d7d19699fec2b58ec038a39c8 Mon Sep 17 00:00:00 2001 From: Christian Steinle Date: Fri, 19 Nov 2021 12:20:29 +0100 Subject: [PATCH] Code formatting for variable names and fix file age for cleaning daily backup . --- odroid.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 }}"