get correct jdk version for centos 5.8 and 6.3

This commit is contained in:
Gareth Rushgrove
2013-04-02 16:08:14 +01:00
parent 4b54bab0cb
commit 5007be2226

View File

@@ -10,7 +10,6 @@
# #
# Sample Usage: # Sample Usage:
# #
# [Remember: No empty lines between comments and class definition]
class java( class java(
$distribution = 'jdk', $distribution = 'jdk',
$version = 'present' $version = 'present'
@@ -26,20 +25,23 @@ class java(
'RedHat': { 'RedHat': {
if ($operatingsystem == 'Fedora') { if ($::operatingsystem == 'Fedora') {
class { 'java::package_redhat': $distribution_redhat = 'java'
version => $version, } elsif ($::operatingsystem == 'Centos') {
distribution => 'java', case $::operatingsystemrelease {
require => Anchor['java::begin'], '5.8': { $distribution_redhat = 'java-1.7.0-openjdk' }
before => Anchor['java::end'], '6.3': { $distribution_redhat = 'java-1.7.0-openjdk' }
default: { $distribution_redhat = $distribution }
} }
} else { } else {
class { 'java::package_redhat': $distribution_redhat = $distribution
version => $version, }
distribution => $distribution,
require => Anchor['java::begin'], class { 'java::package_redhat':
before => Anchor['java::end'], version => $version,
} distribution => $distribution_redhat,
require => Anchor['java::begin'],
before => Anchor['java::end'],
} }
} }