Extend odroid playbook to find old backups of remote servers.

This commit is contained in:
chsteinle
2021-12-21 08:17:57 +01:00
parent 6ce464fc90
commit 0d73ab364b

View File

@@ -209,7 +209,7 @@
register: backup_server_dirs
loop: "{{ servers }}"
- name: Find old daily backups
- name: Find servers old daily backups
find:
path: "{{ item.path }}/daily"
file_type: file
@@ -222,9 +222,10 @@
loop_control:
label: "{{ item.path }}"
- name: Check old backup file variable
debug:
var: item.path
- name: Delete servers old daily backups
file:
path: "{{ item.path }}"
state: absent
with_items: "{{ backup_files.results | map(attribute='files') | list }}"
loop_control:
label: "{{ item.path }}"