Class: Ansible::Ruby::Modules::File
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::File
- Defined in:
- lib/ansible/ruby/modules/generated/core/files/file.rb
Instance Method Summary collapse
-
#follow ⇒ :yes, ...
This flag indicates that filesystem links, if they exist, should be followed.
-
#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).
-
#path ⇒ Object
Path to the file being managed.
-
#recurse ⇒ :yes, ...
Recursively set the specified file attributes (applies only to state=directory).
-
#src ⇒ String?
Path of the file to link to (applies only to C(state=link)).
-
#state ⇒ :file, ...
If C(directory), all immediate subdirectories will be created if they do not exist, since 1.7 they will be created with the supplied permissions.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#follow ⇒ :yes, ...
Returns This flag indicates that filesystem links, if they exist, should be followed.
30 |
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 30 attribute :follow |
#force ⇒ :yes, ...
Returns 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).
26 |
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 26 attribute :force |
#path ⇒ Object
Returns path to the file being managed. Aliases: I(dest), I(name).
10 |
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 10 attribute :path |
#recurse ⇒ :yes, ...
Returns recursively set the specified file attributes (applies only to state=directory).
22 |
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 22 attribute :recurse |
#src ⇒ String?
Returns path of the file to link to (applies only to C(state=link)). Will accept absolute, relative and nonexisting paths. Relative paths are not expanded.
18 |
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 18 attribute :src |
#state ⇒ :file, ...
Returns If C(directory), all immediate subdirectories will be created if they do not exist, since 1.7 they will be created with the supplied permissions. If C(file), the file will NOT be created if it does not exist, see the M(copy) or M(template) module if you want that behavior. If C(link), the symbolic link will be created or changed. Use C(hard) for hardlinks. If C(absent), directories will be recursively deleted, and files or symlinks will be unlinked. If C(touch) (new in 1.4), an empty file will be created if the C(path) does not exist, while an existing file or directory will receive updated file access and modification times (similar to the way ‘touch` works from the command line).
14 |
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 14 attribute :state |