diff --git a/odroid.yaml b/odroid.yaml index 8d26d62..35e0b37 100644 --- a/odroid.yaml +++ b/odroid.yaml @@ -60,7 +60,7 @@ with_items: "{{ subdirs.results }}" loop_control: label: "{{ item.item[0] }} {{ item.item[1] }}" - + - name: Store the yearly backups copy: remote_src: true @@ -92,4 +92,9 @@ dest: "{{ backup_dir }}/{{ item }}/daily/{{ ansible_date_time.iso8601_basic_short }}.sql.gz" loop: "{{ databases }}" when: (ansible_date_time.weekday_number != "7" and ansible_date_time.day != "01") - + + - name: Cleanup original backup files + file: + path: "{{ backup_dir }}/{{ item }}/{{ ansible_date_time.iso8601_basic_short }}.sql.gz" + state: absent + loop: "{{ databases }}" \ No newline at end of file