ansible / ansible.builtin / v2.5.12 / 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.5.12) — module
pip
Install with pip install ansible==2.5.12
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: 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. state: choices: - file - directory default: file description: - Whether to create file or directory. prefix: default: ansible. description: - Prefix of file/directory name created by module. suffix: default: '' description: - Suffix of file/directory name created by module.
path: description: Path to created file or directory returned: success sample: C:\Users\Administrator\AppData\Local\Temp\ansible.bMlvdk type: string