Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Puppet Ruby

Archive Puppet Module

Puppet Forge Version Puppet Forge Downloads Build Status Gemnasium By Camptocamp


Puppet Module to download and extract tar and zip archives based on camptocamp/puppet-archive.

Supported archive types are:

  • tar.gz, tgz
  • tar.bz2, tbz2
  • tar.xz, txz
  • zip


  • Ability to follow redirects
  • Supports checksum matching



archive { 'apache-tomcat-6.0.26':
  ensure => present,
  url    => '',
  target => '/opt',

You can have archive follow redirects by setting:

follow_redirects => true

The default archive format is tar.gz. To use another supported format you must specify the extenstion:

extension => "zip"

By default archive will try and find a matching checksum file to verify the download. To disable this behavior set the checksum option to false:

checksum => false

You can specify a digest_url, digest_string and digest_type to verify archive integrity.

For .tar.gz and tar.bz2 archives, the extract step's --strip-components=n flag can be accessed. This can be used to change the name of the extracted directory.

strip_components => 1
purge_target => false

By default the target directory is left intact, this option can be used to rm -rf the target directory prior to extraction.

This full example will download the packer tool to /usr/local/bin:

archive { '0.5.1_linux_amd64':
   ensure => present,
   url => '',
   target => '/usr/local/bin',
   follow_redirects => true,
   extension => 'zip',
   checksum => false,
   src_target => '/tmp'


Copyright (c) 2012 Camptocamp SA

This script is licensed under the Apache License, Version 2.0.

See for the full license text.


Please log tickets and issues at our project site.

Something went wrong with that request. Please try again.