- name: Remove temporary directory file: path: "{{ temp_install_dir.path }}" state: absent when: temp_install_dir.path is defined