- name: create temporary directory register: remote_tmp_dir notify: - delete temporary directory (windows) ansible.windows.win_tempfile: state: directory suffix: .test - name: record temporary directory set_fact: remote_tmp_dir: '{{ remote_tmp_dir.path }}'