Add puppet/archive module, required for newer puppet/rabbitmq
[mirror/dsa-puppet.git] / 3rdparty / modules / archive / examples / tomcat.pp
1 $dirname = 'apache-tomcat-9.0.0.M3'
2 $filename = "${dirname}.zip"
3 $install_path = "/opt/${dirname}"
4
5 user { 'tomcat':
6   ensure => present,
7   gid    => 'tomcat',
8 }
9
10 group { 'tomcat':
11   ensure => present,
12 }
13
14 file { '/opt/tomcat':
15   ensure => 'link',
16   target => $install_path,
17 }
18
19 file { $install_path:
20   ensure => directory,
21   owner  => 'tomcat',
22   group  => 'tomcat',
23   mode   => '0755',
24 }
25
26 archive { $filename:
27   path          => "/tmp/${filename}",
28   source        => 'http://www-eu.apache.org/dist/tomcat/tomcat-9/v9.0.0.M3/bin/apache-tomcat-9.0.0.M3.zip',
29   checksum      => 'f2aaf16f5e421b97513c502c03c117fab6569076',
30   checksum_type => 'sha1',
31   extract       => true,
32   extract_path  => '/opt',
33   creates       => "${install_path}/bin",
34   cleanup       => true,
35   user          => 'tomcat',
36   group         => 'tomcat',
37   require       => File[$install_path],
38 }