From c81254a23a371acdb6c9cf6d7ff020a9c2ae073d Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Mon, 25 Feb 2019 16:14:14 +0100 Subject: [PATCH] Fix $install_path on CentOS with tar.gz package type When using tar.gz packages on CentOS, the architecture is not part of the name of the installation directory. In this case it's just "jdk1.8.0_201" instead of "jdk1.8.0_201-amd64". --- manifests/oracle.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manifests/oracle.pp b/manifests/oracle.pp index d5025ac..fd0bb67 100644 --- a/manifests/oracle.pp +++ b/manifests/oracle.pp @@ -146,8 +146,9 @@ define java::oracle ( if $release_major =~ /(\d+)u(\d+)/ { # Required for CentOS systems where Java8 update number is >= 171 to ensure - # the package is visible to Puppet - if $facts['os']['family'] == 'RedHat' and $2 >= '171' { + # the package is visible to Puppet. This is only true for installations that + # don't use the tar.gz package type. + if $facts['os']['family'] == 'RedHat' and $2 >= '171' and $package_type != 'tar.gz' { $install_path = "${java_se}1.${1}.0_${2}-amd64" } else { $install_path = "${java_se}1.${1}.0_${2}"