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".
This commit is contained in:
Frank Wall
2019-02-25 16:14:14 +01:00
parent 5509042cd1
commit c81254a23a

View File

@@ -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}"