Check logrotate directories.
This commit is contained in:
@@ -31,4 +31,20 @@
|
||||
path: "{{ backup_dir }}"
|
||||
owner: chris
|
||||
group: chris
|
||||
recurse: yes
|
||||
recurse: yes
|
||||
|
||||
|
||||
- name: Register new backup directories
|
||||
find:
|
||||
paths: "{{ backup_dir }}"
|
||||
file_type: directory
|
||||
recurse: false
|
||||
register: backup_dirs
|
||||
|
||||
- name: Check logrotate directories
|
||||
debug: msg="{{ item[0].path }}/{{ item[1] }}"
|
||||
with_nested:
|
||||
- "{{ backup_dirs.files }}"
|
||||
- ['daily', 'weekly', 'monthly', 'yearly']
|
||||
loop_control:
|
||||
label: "{{ item[0].path }} {{ item[1] }}"
|
||||
|
||||
Reference in New Issue
Block a user