tempfile

Collection: builtin

Full Name: parallax.builtin.tempfile

Aliases: ansible.builtin.tempfile, tempfile

Synopsis

Create a temporary file or directory on the target

Parameters

NameTypeRequiredDefaultDescription
statestringfileWhether to create file or directory Choices: directory, file
pathstringLocation where temporary file or directory should be created
prefixstringansible.Prefix of file/directory name
suffixstringSuffix of file/directory name

Example

- name: Create a scratch directory for the upgrade
  tempfile:
    state: directory
    prefix: upgrade-
  register: scratch