# remove a directory (or file) # https://phoenixnap.com/kb/ansible-create-file --- - name: "08 - Playing with Ansible - remove a directory (or file)" # hosts: all hosts: localhost connection: local tasks: - name: Remove a directory (or file) file: path: "~/ansible_created_directory" state: absent ...