ansible / ansible.builtin / v2.9.23 / module / win_tempfile Creates temporary files and directories | "added in version" 2.3 of ansible.builtin" Authors: Dag Wieers (@dagwieers) preview | supported by communityansible.builtin.win_tempfile (v2.9.23) — module
pip
Install with pip install ansible==2.9.23
Creates temporary files and directories.
For non-Windows targets, please use the M(tempfile) module instead.
- name: Create temporary build directory win_tempfile: state: directory suffix: build
- name: Create temporary file 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: default: '' 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