Class: Ansible::Ruby::Modules::Fetch
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Fetch
- Defined in:
- lib/ansible/ruby/modules/generated/core/files/fetch.rb,
lib/ansible/ruby/modules/custom/files/fetch.rb
Overview
This module works like M(copy), but in reverse. It is used for fetching files from remote machines and storing them locally in a file tree, organized by hostname. Note that this module is written to transfer log files that might not be present, so a missing remote file won’t be an error unless fail_on_missing is set to ‘yes’.
Instance Method Summary collapse
-
#dest ⇒ String
A directory to save the file into.
-
#fail_on_missing ⇒ :yes, ...
Makes it fails when the source file is missing.
-
#flat ⇒ String?
Allows you to override the default behavior of appending hostname/path/to/file to the destination.
-
#src ⇒ String
The file on the remote system to fetch.
-
#validate_checksum ⇒ :yes, ...
Verify that the source and destination checksums match after the files are fetched.
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
#dest ⇒ String
Returns A directory to save the file into. For example, if the I(dest) directory is C(/backup) a I(src) file named C(/etc/profile) on host C(host.example.com), would be saved into C(/backup/host.example.com/etc/profile).
15 |
# File 'lib/ansible/ruby/modules/generated/core/files/fetch.rb', line 15 attribute :dest |
#fail_on_missing ⇒ :yes, ...
Returns Makes it fails when the source file is missing.
19 |
# File 'lib/ansible/ruby/modules/generated/core/files/fetch.rb', line 19 attribute :fail_on_missing |
#flat ⇒ String?
Returns Allows you to override the default behavior of appending hostname/path/to/file to the destination. If dest ends with ‘/’, it will use the basename of the source file, similar to the copy module. Obviously this is only handy if the filenames are unique.
27 |
# File 'lib/ansible/ruby/modules/generated/core/files/fetch.rb', line 27 attribute :flat |
#src ⇒ String
Returns The file on the remote system to fetch. This I(must) be a file, not a directory. Recursive fetching may be supported in a later release.
11 |
# File 'lib/ansible/ruby/modules/generated/core/files/fetch.rb', line 11 attribute :src |
#validate_checksum ⇒ :yes, ...
Returns Verify that the source and destination checksums match after the files are fetched.
23 |
# File 'lib/ansible/ruby/modules/generated/core/files/fetch.rb', line 23 attribute :validate_checksum |