Ask Your Question

puppet archive module extracts on every run

asked 2016-05-11 04:50:27 -0500

prototyp gravatar image


I am trying to download an extract archive. For that I use the puppet-archive module from camptocamp. Download and extraction works fine but the extraction is happening on every puppet run. The extraction needs a lot of time. Somebody knows how to extract the archive just ones?

archive {"mySource-${mySource_version}":
                ensure     => present,
                url        => "${mySource_version}.tar.gz",
                target     => "/mySource_data/src/mySource-${mySource_version}",
                extension  => 'tar.gz',
                checksum   => true,
                src_target => '/tmp',
                user       => 'mySourceuser',
                timeout    => 7200,
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2016-05-11 05:43:46 -0500


 root_dir      => '.',

this will stop repeat extractions

edit flag offensive delete link more


works great! thanks a lot :)!

prototyp gravatar imageprototyp ( 2016-05-11 06:58:16 -0500 )edit

answered 2016-05-11 07:06:02 -0500

prototyp gravatar image

Is there also another param to set the permissions? I tried:

mode    => '0744',
edit flag offensive delete link more


interesting - you can set user and group however I dont think there is a mode setting - possibly a better way of doing this but what i would add would be something l : exec { 'change permission': command => "chmod -R 0744 $install_path", path => $::path, subscribe => Archive[$filename]}

sahumphries gravatar imagesahumphries ( 2016-05-11 09:59:08 -0500 )edit

Make it a refreshonly => true so it doesn't run every puppet run, only when an extract occurs!

DarylW gravatar imageDarylW ( 2016-05-11 22:10:51 -0500 )edit

Would prefer to not use so many exec and use instead a puppet resource. Started a new post @

prototyp gravatar imageprototyp ( 2016-05-12 02:28:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-05-11 04:50:27 -0500

Seen: 91 times

Last updated: May 11 '16