This repository was archived by the owner on Dec 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathinit.pp
More file actions
70 lines (61 loc) · 1.78 KB
/
init.pp
File metadata and controls
70 lines (61 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Public: installs java jre-7u51 and JCE unlimited key size policy files
#
# Examples
#
# include java
class java (
$update_version = '25',
$base_download_url = 'https://s3.amazonaws.com/boxen-downloads/java'
) {
include boxen::config
$jre_url = "${base_download_url}/jre-8u${update_version}-macosx-x64.dmg"
$jdk_url = "${base_download_url}/jdk-8u${update_version}-macosx-x64.dmg"
$wrapper = "${boxen::config::bindir}/java"
$jdk_dir = "/Library/Java/JavaVirtualMachines/jdk1.8.0_${update_version}.jdk"
$sec_dir = "${jdk_dir}/Contents/Home/jre/lib/security"
if ((versioncmp($::macosx_productversion_major, '10.10') >= 0) and
versioncmp($update_version, '20') < 0)
{
fail('Yosemite Requires Java 8 with a patch level >= 20 (Bug JDK-8027686)')
}
package {
'jre-8.dmg':
ensure => present,
alias => 'java-jre',
provider => pkgdmg,
source => $jre_url ;
'jdk-8.dmg':
ensure => present,
alias => 'java',
provider => pkgdmg,
source => $jdk_url ;
}
file { $wrapper:
source => 'puppet:///modules/java/java.sh',
mode => '0755',
require => Package['java']
}
# Allow 'large' keys locally.
# http://www.ngs.ac.uk/tools/jcepolicyfiles
file { $sec_dir:
ensure => 'directory',
owner => 'root',
group => 'wheel',
mode => '0775',
require => Package['java']
}
file { "${sec_dir}/local_policy.jar":
source => 'puppet:///modules/java/local_policy.jar',
owner => 'root',
group => 'wheel',
mode => '0664',
require => File[$sec_dir]
}
file { "${sec_dir}/US_export_policy.jar":
source => 'puppet:///modules/java/US_export_policy.jar',
owner => 'root',
group => 'wheel',
mode => '0664',
require => File[$sec_dir]
}
}