ansible / ansible.windows / 2.3.0 / module / win_tempfile Creates temporary files and directories Authors: Dag Wieers (@dagwieers)ansible.windows.win_tempfile (2.3.0) — module
Install with ansible-galaxy collection install ansible.windows:==2.3.0
collections: - name: ansible.windows version: 2.3.0
Creates temporary files and directories.
For non-Windows targets, please use the M(ansible.builtin.tempfile) module instead.
- name: Create temporary build directory ansible.windows.win_tempfile: state: directory suffix: build
- name: Create temporary file ansible.windows.win_tempfile: state: file suffix: temp
path: aliases: - dest default: '%TEMP%' description: - Location where temporary file or directory should be created. - If path is not specified default system temporary directory (%TEMP%) will be used. type: path state: choices: - directory - file default: file description: - Whether to create file or directory. type: str prefix: default: ansible. description: - Prefix of file/directory name created by module. type: str suffix: description: - Suffix of file/directory name created by module. type: str
path: description: The absolute path to the created file or directory. returned: success sample: C:\Users\Administrator\AppData\Local\Temp\ansible.bMlvdk type: str