Ansible - delete all files into a folder

- name: delete all files on mountpoint /var/log/ - mkdir empty dir file: state=directory path=/dev/shm/empty - name: delete all files on mountpoint /var/log - rsync empty dir synchronize: src=/dev/shm/empty/ dest=/var/log/ recursive=yes delete=yes delegate_to: "{{ inventory_hostname }}"