Ansible can't recursively delete a directory
You may find the following format to be helpful:

- name: Recursively change ownership of a directory  
file:  
  path: /etc/foo
  state: directory
  recurse: yes
  owner: foo
  group: foo