- name: Remove temporary directory hosts: windows gather_facts: false tasks: - name: Delete temp directory ansible.windows.win_file: path: C:\apps\temp state: absent