Merge branch 'master' into allow-tildes-in-version
This commit is contained in:
@@ -18,6 +18,10 @@
|
||||
# The name of the java package. This is configurable in case a non-standard
|
||||
# java package is desired.
|
||||
#
|
||||
# [*package_options*]
|
||||
# Array of strings to pass installation options to the 'package' Puppet resource.
|
||||
# Options available depend on the 'package' provider for the target OS.
|
||||
#
|
||||
# [*java_alternative*]
|
||||
# The name of the java alternative to use on Debian systems.
|
||||
# "update-java-alternatives -l" will show which choices are available.
|
||||
@@ -41,12 +45,17 @@ class java(
|
||||
$distribution = 'jdk',
|
||||
$version = 'present',
|
||||
$package = undef,
|
||||
$package_options = undef,
|
||||
$java_alternative = undef,
|
||||
$java_alternative_path = undef
|
||||
) {
|
||||
include java::params
|
||||
|
||||
validate_re($version, 'present|installed|latest|^[.+_0-9a-zA-Z:~-]+$')
|
||||
|
||||
if $package_options != undef {
|
||||
validate_array($package_options)
|
||||
}
|
||||
|
||||
if has_key($java::params::java, $distribution) {
|
||||
$default_package_name = $java::params::java[$distribution]['package']
|
||||
@@ -98,8 +107,9 @@ class java(
|
||||
anchor { 'java::begin:': }
|
||||
->
|
||||
package { 'java':
|
||||
ensure => $version,
|
||||
name => $use_java_package_name,
|
||||
ensure => $version,
|
||||
install_options => $package_options,
|
||||
name => $use_java_package_name,
|
||||
}
|
||||
->
|
||||
class { 'java::config': }
|
||||
|
||||
@@ -106,9 +106,21 @@ class java::params {
|
||||
'alternative_path' => '/usr/lib/jvm/j2sdk1.7-oracle/jre/bin/java',
|
||||
'java_home' => '/usr/lib/jvm/j2sdk1.7-oracle/jre/',
|
||||
},
|
||||
'oracle-j2re' => {
|
||||
'package' => 'oracle-j2re1.8',
|
||||
'alternative' => 'j2re1.8-oracle',
|
||||
'alternative_path' => '/usr/lib/jvm/j2re1.8-oracle/bin/java',
|
||||
'java_home' => '/usr/lib/jvm/j2re1.8-oracle/',
|
||||
},
|
||||
'oracle-j2sdk' => {
|
||||
'package' => 'oracle-j2sdk1.8',
|
||||
'alternative' => 'j2sdk1.8-oracle',
|
||||
'alternative_path' => '/usr/lib/jvm/j2sdk1.8-oracle/bin/java',
|
||||
'java_home' => '/usr/lib/jvm/j2sdk1.8-oracle/',
|
||||
},
|
||||
}
|
||||
}
|
||||
'vivid': {
|
||||
'vivid', 'wily': {
|
||||
$java = {
|
||||
'jdk' => {
|
||||
'package' => 'openjdk-8-jdk',
|
||||
@@ -133,6 +145,12 @@ class java::params {
|
||||
'jre' => { 'package' => 'jre', },
|
||||
}
|
||||
}
|
||||
'FreeBSD': {
|
||||
$java = {
|
||||
'jdk' => { 'package' => 'openjdk', },
|
||||
'jre' => { 'package' => 'openjdk-jre', },
|
||||
}
|
||||
}
|
||||
'Solaris': {
|
||||
$java = {
|
||||
'jdk' => { 'package' => 'developer/java/jdk-7', },
|
||||
|
||||
Reference in New Issue
Block a user