From 0bcdd2bc2f65041d1fbc0cd2abe4d6e461d5192c Mon Sep 17 00:00:00 2001 From: Kilian Engelhardt Date: Tue, 20 Jun 2017 17:38:06 +0200 Subject: [PATCH 1/2] add basic arch linux support --- manifests/config.pp | 9 +++++++++ manifests/params.pp | 15 +++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/manifests/config.pp b/manifests/config.pp index 063f634..5c7f3fd 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -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. } diff --git a/manifests/params.pp b/manifests/params.pp index 6aa558a..5d9a626 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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}") } } } From 6951263d4cc0d3ac2abdebd04bebe3f2fb9d04e1 Mon Sep 17 00:00:00 2001 From: Kilian Engelhardt Date: Wed, 21 Jun 2017 11:08:40 +0200 Subject: [PATCH 2/2] fix indentation and remove a white line --- manifests/init.pp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 2a9a7d9..eb079ab 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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. @@ -36,8 +35,8 @@ # correct JVM is enabled. # # [*java_home*] -# The path to where the JRE is installed. This will be set as an -# environment variable. +# The path to where the JRE is installed. This will be set as an +# environment variable. # # Actions: #