--- - name: Test playbook hosts: all tasks: - name: Remove temp files become: true file: path: "{{ item }}" state: absent with_items: - "/tmp/test-1"