Merge pull request #244 from kBite/add-support-for-arch-linux

Add support for Archlinux
This commit is contained in:
Hunter Haugen
2017-06-21 14:29:25 -07:00
3 changed files with 26 additions and 3 deletions

View File

@@ -62,6 +62,15 @@ class java::config ( ) {
}
}
}
'Archlinux': {
if $java::use_java_home != undef {
file_line { 'java-home-environment':
path => '/etc/profile',
line => "JAVA_HOME=${$java::use_java_home}",
match => 'JAVA_HOME=',
}
}
}
default: {
# Do nothing.
}

View File

@@ -9,7 +9,6 @@
# or other platform-specific options where there are multiple
# implementations available (eg: OpenJDK vs Oracle JDK).
#
#
# [*version*]
# The version of java to install. By default, this module simply ensures
# that java is present, and does not require a specific version.

View File

@@ -253,6 +253,21 @@ class java::params {
},
}
}
'Archlinux': {
$jdk_package = 'jdk8-openjdk'
$jre_package = 'jre8-openjdk'
$java_home = '/usr/lib/jvm/java-8-openjdk/jre/'
$java = {
'jdk' => {
'package' => $jdk_package,
'java_home' => $java_home,
},
'jre' => {
'package' => $jre_package,
'java_home' => $java_home,
},
}
}
default: { fail("unsupported platform ${::osfamily}") }
}
}