Support multiple JVM, and Debian alternatives.

Add ability to customize which JVM is installed on Debian.
Additionally, configure alternatives on Debian.
This commit is contained in:
Sharif Nassar
2013-06-18 14:12:36 -07:00
parent cde7046e99
commit ad93b44405
6 changed files with 181 additions and 27 deletions

17
manifests/config.pp Normal file
View File

@@ -0,0 +1,17 @@
# On Debian systems, if alternatives are set, manually assign them.
class java::config ( ) {
case $::osfamily {
Debian: {
if $java::use_java_alternative != undef and $java::use_java_alternative_path != undef {
exec { 'update-java-alternatives':
path => '/usr/bin:/usr/sbin:/bin:/sbin',
command => "update-java-alternatives --set ${java::use_java_alternative} --jre",
unless => "test /etc/alternatives/java -ef '${java::use_java_alternative_path}'",
}
}
}
default: {
# Do nothing.
}
}
}