Re: [ansible-project] Delete content of FileSystem with a lot files using find and file module

2019-08-28 Thread Eino Tuominen
Hi, Two obvious options would be a) use shell module with find . -type f -print0 | xargs -0 rm or similar b) use command module instead of file module as your second task - name: Delete command: xargs rm args: stdin: "{{ files_to_delete | json_query('files[*].path') |

[ansible-project] Delete content of FileSystem with a lot files using find and file module

2019-08-28 Thread Alberto Jimenez Lozano
I want to delete all files and directories in a filesystem. I have done a playbook with module find and file. I get a list of files with the module find and then I delete the list with module file and the option absent. * - name: Gen list* *find:* * paths: "{{fs1}}"* * recurse: