Hi All,
I am using the below code for deleting file from folders, i am able to
delete file from parent folder but its skipping files in sub folders:
Please check and help me getting this fixed.
- name: Ansible delete files older than 1 minutes example
find:
paths: '{{diskclrpath}}'
age: '{{fileage}}'
patterns: '{{file_ext}}'
size: '{{file_size}}'
register: files_to_delete
- name: Ansible remove files older than a date example
file:
path: "{{ item.path }}"
state: absent
with_items: "{{ files_to_delete.files }}"
loop_control:
label: "{{ item.path }}"
when: ((diskspc_util >= '{{diskuseper}}') and ( 'rwx' in
permissionchk))
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/fa2acbb4-a72b-454e-a42e-bbfe948ff49d%40googlegroups.com.