Class: Ansible::Ruby::Modules::Unarchive
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Unarchive
- Includes:
- Helpers::FileAttributes
- Defined in:
- lib/ansible/ruby/modules/generated/files/unarchive.rb,
lib/ansible/ruby/modules/custom/files/unarchive.rb
Overview
The C(unarchive) module unpacks an archive. By default, it will copy the source file from the local system to the target before unpacking. Set C(remote_src=yes) to unpack an archive which already exists on the target. For Windows targets, use the M(win_unzip) module instead. If checksum validation is desired, use M(get_url) or M(uri) instead to fetch the file and set C(remote_src=yes).
Instance Method Summary collapse
-
#copy ⇒ :yes, ...
If true, the file is copied from local ‘master’ to the target machine, otherwise, the plugin will look for src archive at the target machine.,This option has been deprecated in favor of C(remote_src).,This option is mutually exclusive with C(remote_src).
-
#creates ⇒ Object?
If the specified absolute path (file or directory) already exists, this step will B(not) be run.
-
#dest ⇒ String
Remote absolute path where the archive should be unpacked.
-
#exclude ⇒ Object?
List the directory and file entries that you would like to exclude from the unarchive action.
-
#extra_opts ⇒ String?
Specify additional options by passing in an array.
-
#keep_newer ⇒ :yes, ...
Do not replace existing files that are newer than files from the archive.
-
#list_files ⇒ :yes, ...
If set to True, return the list of files that are contained in the tarball.
-
#remote_src ⇒ :yes, ...
Set to C(yes) to indicate the archived file is already on the remote system and not local to the Ansible controller.,This option is mutually exclusive with C(copy).
-
#src ⇒ String
If C(remote_src=no) (default), local path to archive file to copy to the target server; can be absolute or relative.
-
#validate_certs ⇒ :yes, ...
This only applies if using a https URL as the source of the file.,This should only set to C(no) used on personally controlled sites using self-signed certificate.,Prior to 2.2 the code worked as if this was set to C(yes).
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
#copy ⇒ :yes, ...
Returns If true, the file is copied from local ‘master’ to the target machine, otherwise, the plugin will look for src archive at the target machine.,This option has been deprecated in favor of C(remote_src).,This option is mutually exclusive with C(remote_src).
24 |
# File 'lib/ansible/ruby/modules/generated/files/unarchive.rb', line 24 attribute :copy |
#creates ⇒ Object?
Returns If the specified absolute path (file or directory) already exists, this step will B(not) be run.
28 |
# File 'lib/ansible/ruby/modules/generated/files/unarchive.rb', line 28 attribute :creates |
#dest ⇒ String
Returns Remote absolute path where the archive should be unpacked.
20 |
# File 'lib/ansible/ruby/modules/generated/files/unarchive.rb', line 20 attribute :dest |
#exclude ⇒ Object?
Returns List the directory and file entries that you would like to exclude from the unarchive action.
35 |
# File 'lib/ansible/ruby/modules/generated/files/unarchive.rb', line 35 attribute :exclude |
#extra_opts ⇒ String?
Returns Specify additional options by passing in an array.
42 |
# File 'lib/ansible/ruby/modules/generated/files/unarchive.rb', line 42 attribute :extra_opts |
#keep_newer ⇒ :yes, ...
Returns Do not replace existing files that are newer than files from the archive.
38 |
# File 'lib/ansible/ruby/modules/generated/files/unarchive.rb', line 38 attribute :keep_newer |
#list_files ⇒ :yes, ...
Returns If set to True, return the list of files that are contained in the tarball.
31 |
# File 'lib/ansible/ruby/modules/generated/files/unarchive.rb', line 31 attribute :list_files |
#remote_src ⇒ :yes, ...
Returns Set to C(yes) to indicate the archived file is already on the remote system and not local to the Ansible controller.,This option is mutually exclusive with C(copy).
46 |
# File 'lib/ansible/ruby/modules/generated/files/unarchive.rb', line 46 attribute :remote_src |
#src ⇒ String
Returns If C(remote_src=no) (default), local path to archive file to copy to the target server; can be absolute or relative. If C(remote_src=yes), path on the target server to existing archive file to unpack.,If C(remote_src=yes) and C(src) contains C(://), the remote machine will download the file from the URL first. (version_added 2.0). This is only for simple cases, for full download support use the M(get_url) module.
16 |
# File 'lib/ansible/ruby/modules/generated/files/unarchive.rb', line 16 attribute :src |
#validate_certs ⇒ :yes, ...
Returns This only applies if using a https URL as the source of the file.,This should only set to C(no) used on personally controlled sites using self-signed certificate.,Prior to 2.2 the code worked as if this was set to C(yes).
50 |
# File 'lib/ansible/ruby/modules/generated/files/unarchive.rb', line 50 attribute :validate_certs |