Class: Ansible::Ruby::Modules::Copy
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Copy
- Includes:
- Helpers::FileAttributes
- Defined in:
- lib/ansible/ruby/modules/generated/files/copy.rb,
lib/ansible/ruby/modules/custom/files/copy.rb
Overview
The C(copy) module copies a file from the local or remote machine to a location on the remote machine. Use the M(fetch) module to copy files from remote locations to the local box. If you need variable interpolation in copied files, use the M(template) module. For Windows targets, use the M(win_copy) module instead.
Instance Method Summary collapse
-
#backup ⇒ :yes, ...
Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.
-
#checksum ⇒ Object?
SHA1 checksum of the file being transferred.
-
#content ⇒ String?
When used instead of I(src), sets the contents of a file directly to the specified value.
-
#dest ⇒ String
Remote absolute path where the file should be copied to.
-
#directory_mode ⇒ Object?
When doing a recursive copy set the mode for the directories.
-
#follow ⇒ :yes, ...
This flag indicates that filesystem links in the destination, if they exist, should be followed.
-
#force ⇒ :yes, ...
The default is C(yes), which will replace the remote file when contents are different than the source.
-
#local_follow ⇒ :yes, ...
This flag indicates that filesystem links in the source tree, if they exist, should be followed.
-
#mode ⇒ Integer, ...
Mode the file or directory should be.
-
#remote_src ⇒ :yes, ...
If C(no), it will search for I(src) at originating/master machine.,If C(yes) it will go to the remote/target machine for the I(src).
-
#src ⇒ String?
Local path to a file to copy to the remote server; can be absolute or relative.
Methods included from Helpers::FileAttributes
Methods inherited from Base
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
#backup ⇒ :yes, ...
25 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 25 attribute :backup |
#checksum ⇒ Object?
52 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 52 attribute :checksum |
#content ⇒ String?
17 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 17 attribute :content |
#dest ⇒ String
21 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 21 attribute :dest |
#directory_mode ⇒ Object?
37 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 37 attribute :directory_mode |
#follow ⇒ :yes, ...
44 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 44 attribute :follow |
#force ⇒ :yes, ...
29 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 29 attribute :force |
#local_follow ⇒ :yes, ...
48 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 48 attribute :local_follow |
#mode ⇒ Integer, ...
33 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 33 attribute :mode |
#remote_src ⇒ :yes, ...
40 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 40 attribute :remote_src |
#src ⇒ String?
13 |
# File 'lib/ansible/ruby/modules/generated/files/copy.rb', line 13 attribute :src |