Class: Ansible::Ruby::Modules::Fetch
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Fetch
- Defined in:
- lib/ansible/ruby/modules/generated/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. This module is also supported for Windows targets.
Instance Method Summary collapse
-
#dest ⇒ String
A directory to save the file into.
-
#fail_on_missing ⇒ :yes, ...
When set to ‘yes’, the task will fail if the remote file cannot be read for any reason.
-
#flat ⇒ :yes, ...
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).
17 |
# File 'lib/ansible/ruby/modules/generated/files/fetch.rb', line 17 attribute :dest |
#fail_on_missing ⇒ :yes, ...
Returns When set to ‘yes’, the task will fail if the remote file cannot be read for any reason. Prior to Ansible-2.5, setting this would only fail if the source file was missing.,The default was changed to “yes” in Ansible-2.5.
21 |
# File 'lib/ansible/ruby/modules/generated/files/fetch.rb', line 21 attribute :fail_on_missing |
#flat ⇒ :yes, ...
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.
29 |
# File 'lib/ansible/ruby/modules/generated/files/fetch.rb', line 29 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.
13 |
# File 'lib/ansible/ruby/modules/generated/files/fetch.rb', line 13 attribute :src |
#validate_checksum ⇒ :yes, ...
Returns Verify that the source and destination checksums match after the files are fetched.
25 |
# File 'lib/ansible/ruby/modules/generated/files/fetch.rb', line 25 attribute :validate_checksum |