salt.states.archive

Archive states.

salt.states.archive.extracted(name, source, archive_format, tar_options=None, source_hash=None, if_missing=None)

New in version 2014.1.0: (Hydrogen)

State that make sure an archive is extracted in a directory. The downloaded archive is erased if succesfully extracted. The archive is downloaded only if necessary.

graylog2-server:
  archive:
    - extracted
    - name: /opt/
    - source: https://github.com/downloads/Graylog2/graylog2-server/graylog2-server-0.9.6p1.tar.gz
    - source_hash: md5=499ae16dcae71eeb7c3a30c75ea7a1a6
    - archive_format: tar
    - tar_options: z
    - if_missing: /opt/graylog2-server-0.9.6p1/
name
Directory name where to extract the archive
source
Archive source, same syntax as file.managed source argument.
archive_format
tar, zip or rar
if_missing
Some archive, such as tar, extract themself in a subfolder. This directive can be used to validate if the archive had been previously extracted.
tar_options
Only used for tar format, it need to be the tar argument specific to this archive, such as 'j' for bzip2, 'z' for gzip, '' for uncompressed tar, 'J' for LZMA.

Current Salt release: 2014.1.6

Docs for previous releases on salt.rtfd.org.

Previous topic

salt.states.apt

Next topic

salt.states.augeas

Upcoming SaltStack Events