I want to remove the all "test" folders inside the subdirectories of server. Like below is the path of "test" folders. There are multiple directories in home folder, So, I cant specify all the paths in playbook.
Path: /home/*/test
I have write the below playbook for this but it doesnt work.
tasks: - name: Delete the folder file: path: "{{ item }}" state: absent with_items: - "/home/*/test" Could you please let me know the solution for it..
I have tried to use file_glob but doesn't work. I want to delete the test folders from all the subdirectories.