archive

5 views
Skip to first unread message

Tej Singh Rana

unread,
Jun 25, 2020, 11:00:13 PM6/25/20
to puppet...@googlegroups.com
Using the archive module, zip file is available in agent node and accessed to extract from master node. Unfortunately not running. Any idea puppet users?

archive { "xyz.zip":
             ensure => present,
             extract => true,
             source => "file:///usr/src/base/xyz.zip",
             filename => "xyz.zip",
             extract_path => "/opt/data",
    } 

regards,

Yvan Broccard

unread,
Jun 26, 2020, 1:59:11 AM6/26/20
to puppet...@googlegroups.com
Hello,
I'm using this module in a couple of nodes with success.

Here are three of my usecases :

   'archive': {
     archive { "/tmp/${file}":
       ensure          => present,
       extract         => true,
       extract_command => 'tar xfz %s --strip-components=1',
       extract_path    => $jira::webappdir,
       source          => "${jira::download_url}/${file}",
       creates         => "${jira::webappdir}/conf",
       cleanup         => true,
       checksum_verify => $jira::checksum_verify,
       checksum_type   => 'md5',
       checksum        => $jira::checksum,
       user            => $jira::user,
       group           => $jira::group,
       proxy_server    => $jira::proxy_server,
       proxy_type      => $jira::proxy_type,
       before          => File[$jira::homedir],
       require         => [
         File[$jira::installdir],
         File[$jira::webappdir],
         User[$jira::user],
       ],
     }
   }


 archive { '/tmp/notouchcenter-clearcube-4.2.774.deb':
   ensure        => present,
   provider      => 'wget',
   extract       => false,
   source        => 'http://largefiles.rsvgnw.local/notouch/notouchcenter-clearcube-4.2.774.deb',
   checksum      => '05508e68c9ea4f008e5fdae0ff87177a42938aa5',
   checksum_type => 'sha1',
   user          => 'root',
   group         => 'root',
   require       => Package['wget'],
 }


 archive { '/mnt/lnxmirror/vcenterbck/vcsa_backup.sh':
   source  => 'https://git.rsvgnw.local:8443/projects/INFRA/repos/vcenterbackup/raw/vcsa_backup.sh?at=refs%2Fheads%2Fmaster',
   extract => false,
   #checksum_type => sha256,
   #checksum      => '2a3d7c2ee42ab6bea5439215be4fb79874f9fec582562f6e6828b98de91f9692',
 }

Cheers
Yvan


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CADBoQTrnKhOmQxtSc6qArQnfHMO0oQOZaiJ%3DtQV-QLw1X2t-yQ%40mail.gmail.com.

Tej Singh Rana

unread,
Jun 28, 2020, 3:15:05 AM6/28/20
to puppet...@googlegroups.com
$dirname = 'blog'
$filename = "${dirname}.zip"
$install_path = "/opt/${dirname}"

class archive {
archive { '/opt/blog':
   path => "/usr/src/blog/${filename}",
   ensure => present,
   source => "file://usr/src/blog/${filename}",
   extract_command => "unzip /usr/src/blog/blog.zip  /opt/blog"
   extract => true,
   extract_path => "/opt/$dirname",
   cleanup => false,

}
  }

Tej Singh Rana

unread,
Jun 28, 2020, 3:15:19 AM6/28/20
to puppet...@googlegroups.com
Nothing happening and not getting any errors.
Reply all
Reply to author
Forward
0 new messages