I have some directories and files inside a directory called dir1
I am trying to empty that directory using the below code
- name: Clean path
file:
state: absent
path: "/home/location/dir1"
But it is deleting the dir1
itself, i would like to empty it and keep this dir1
, what am i missing here, any help on this would be appreciated.