unarchive

Collection: builtin

Full Name: parallax.builtin.unarchive

Aliases: ansible.builtin.unarchive, unarchive

Synopsis

Manage unarchive

Parameters

NameTypeRequiredDefaultDescription
srcstringyesPath to the archive file (local or remote path, or URL)
deststringyesRemote absolute path where the archive should be unpacked
remote_srcboolfalseSet to yes to unpack an archive which already exists on the target
createsstringIf specified absolute path exists, extraction will be skipped
list_filesboolfalseIf set to true, return the list of files contained in the archive
keep_newerboolfalseDo not replace existing files that are newer than files from the archive
excludelistList of files or directories to exclude from extraction
includelistList of files or directories to extract from the archive (mutually exclusive with exclude)
extra_optslistAdditional options to pass to the unarchive command
validate_certsbooltrueWhether to validate SSL certificates when downloading from HTTPS URLs
io_buffer_sizeint65536Size of the buffer (in bytes) used when extracting files
copybooltrueDeprecated in favor of remote_src
decryptbooltrueControls the auto-decryption of source files using vault
modestringThe permissions the resulting files or directories should have
ownerstringName of the user that should own the files/directories
groupstringName of the group that should own the files/directories
seuserstringThe user part of the SELinux file context
serolestringThe role part of the SELinux file context
setypestringThe type part of the SELinux file context
selevelstringThe level part of the SELinux file context
attributesstringThe attributes the resulting files should have (alias: attr)
unsafe_writesboolfalseAllow unsafe file operations
attrstringAlias for attributes parameter

Example

- name: Example unarchive task
  unarchive:
    src: <your_src>
    dest: <your_dest>