Class: Ansible::Ruby::Modules::Tempfile

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/files/tempfile.rb

Overview

The C(tempfile) module creates temporary files and directories. C(mktemp) command takes different parameters on various systems, this module helps to avoid troubles related to that. Files/directories created by module are accessible only by creator. In case you need to make them world-accessible you need to use M(file) module. For Windows targets, use the M(win_tempfile) module instead.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#pathObject?

Returns Location where temporary file or directory should be created. If path is not specified default system temporary directory will be used.

Returns:

  • (Object, nil)

    Location where temporary file or directory should be created. If path is not specified default system temporary directory will be used.



17
# File 'lib/ansible/ruby/modules/generated/files/tempfile.rb', line 17

attribute :path

#prefixString?

Returns Prefix of file/directory name created by module.

Returns:

  • (String, nil)

    Prefix of file/directory name created by module.



20
# File 'lib/ansible/ruby/modules/generated/files/tempfile.rb', line 20

attribute :prefix

#state:directory, ...

Returns Whether to create file or directory.

Returns:

  • (:directory, :file, nil)

    Whether to create file or directory.



13
# File 'lib/ansible/ruby/modules/generated/files/tempfile.rb', line 13

attribute :state

#suffixString?

Returns Suffix of file/directory name created by module.

Returns:

  • (String, nil)

    Suffix of file/directory name created by module.



24
# File 'lib/ansible/ruby/modules/generated/files/tempfile.rb', line 24

attribute :suffix