Class: Ansible::Ruby::Modules::File
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::File
- Includes:
- Helpers::FileAttributes
- Defined in:
- lib/ansible/ruby/modules/generated/files/file.rb,
lib/ansible/ruby/modules/custom/files/file.rb
Overview
Sets attributes of files, symlinks, and directories, or removes files/symlinks/directories. Many other modules support the same options as the C(file) module - including M(copy), M(template), and M(assemble). For Windows targets, use the M(win_file) module instead.
Instance Method Summary collapse
-
#access_time ⇒ String?
This parameter indicates the time the file’s access time should be set to,Should be C(preserve) when no modification is required, C(YYYYMMDDHHMM.SS) when using default time format, or C(now),Default is None meaning that C(preserve) is the default for C(state=) and C(now) is default for C(state=touch).
-
#access_time_format ⇒ String?
When used with C(access_time), indicates the time format that must be used.,Based on default Python format (see time.strftime doc).
-
#follow ⇒ :yes, ...
This flag indicates that filesystem links, if they exist, should be followed.,Previous to Ansible 2.5, this was C(no) by default.
-
#force ⇒ :yes, ...
Force the creation of the symlinks in two cases: the source file does not exist (but will appear later); the destination exists and is a file (so, we need to unlink the “path” file and create symlink to the “src” file in place of it).
-
#modification_time ⇒ String?
This parameter indicates the time the file’s modification time should be set to,Should be C(preserve) when no modification is required, C(YYYYMMDDHHMM.SS) when using default time format, or C(now),Default is None meaning that C(preserve) is the default for C(state=) and C(now) is default for C(state=touch).
-
#modification_time_format ⇒ String?
When used with C(modification_time), indicates the time format that must be used.,Based on default Python format (see time.strftime doc).
-
#path ⇒ String
Path to the file being managed.
-
#recurse ⇒ :yes, ...
Recursively set the specified file attributes (applies only to directories).
-
#src ⇒ String?
Path of the file to link to (applies only to C(state=link) and C(state=hard)).
-
#state ⇒ :absent, ...
If C(directory), all intermediate subdirectories will be created if they do not exist.
Methods included from Helpers::FileAttributes
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#access_time ⇒ String?
45 |
# File 'lib/ansible/ruby/modules/generated/files/file.rb', line 45 attribute :access_time |
#access_time_format ⇒ String?
49 |
# File 'lib/ansible/ruby/modules/generated/files/file.rb', line 49 attribute :access_time_format |
#follow ⇒ :yes, ...
33 |
# File 'lib/ansible/ruby/modules/generated/files/file.rb', line 33 attribute :follow |
#force ⇒ :yes, ...
29 |
# File 'lib/ansible/ruby/modules/generated/files/file.rb', line 29 attribute :force |
#modification_time ⇒ String?
37 |
# File 'lib/ansible/ruby/modules/generated/files/file.rb', line 37 attribute :modification_time |
#modification_time_format ⇒ String?
41 |
# File 'lib/ansible/ruby/modules/generated/files/file.rb', line 41 attribute :modification_time_format |
#path ⇒ String
13 |
# File 'lib/ansible/ruby/modules/generated/files/file.rb', line 13 attribute :path |
#recurse ⇒ :yes, ...
25 |
# File 'lib/ansible/ruby/modules/generated/files/file.rb', line 25 attribute :recurse |
#src ⇒ String?
21 |
# File 'lib/ansible/ruby/modules/generated/files/file.rb', line 21 attribute :src |
#state ⇒ :absent, ...
17 |
# File 'lib/ansible/ruby/modules/generated/files/file.rb', line 17 attribute :state |