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: { default: {
# Do nothing. # Do nothing.
} }

View File

@@ -9,7 +9,6 @@
# or other platform-specific options where there are multiple # or other platform-specific options where there are multiple
# implementations available (eg: OpenJDK vs Oracle JDK). # implementations available (eg: OpenJDK vs Oracle JDK).
# #
#
# [*version*] # [*version*]
# The version of java to install. By default, this module simply ensures # The version of java to install. By default, this module simply ensures
# that java is present, and does not require a specific version. # that java is present, and does not require a specific version.
@@ -36,8 +35,8 @@
# correct JVM is enabled. # correct JVM is enabled.
# #
# [*java_home*] # [*java_home*]
# The path to where the JRE is installed. This will be set as an # The path to where the JRE is installed. This will be set as an
# environment variable. # environment variable.
# #
# Actions: # Actions:
# #

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}") } default: { fail("unsupported platform ${::osfamily}") }
} }
} }