Ansible: How to delete files and folders inside a directory?
The below code only deletes the first file it gets inside the web dir. I want to remove all the files and folders inside the web directory and retain the web directory. How can I do that? – name: remove web dir contents file: path=”/home/mydata/web/{{ item }}” state=absent with_fileglob: – /home/mydata/web/* Note: I’ve tried rm … Read more