Skip to content

unpack

!unpack

Category: files

Extract an archive (tar.gz/tgz/tar.bz2/tar.xz/tar/zip, or single-file gz/bz2/xz) on the target into a destination directory. Source archive must exist on the target.

Parameters

NameTypeRequiredDescription
srcpathyesRemote path to the archive (format inferred from extension).
destpathyesRemote destination directory (created if missing).
modestringnoOctal permission string applied recursively via chmod -R after extraction.
ownerstringnoOwner applied recursively via chown -R after extraction.
groupstringnoGroup applied recursively via chown -R after extraction.

Examples

- !unpack
  src: /opt/app/app.tar.gz
  dest: /opt/app
  owner: app
  group: app