diff --git a/semaphore.yaml b/semaphore.yaml index d19445a..f492688 100644 --- a/semaphore.yaml +++ b/semaphore.yaml @@ -31,4 +31,20 @@ path: "{{ backup_dir }}" owner: chris group: chris - recurse: yes \ No newline at end of file + 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] }}"