From 3afa0813eab127f1dd9eca4ba25560f45b7c3358 Mon Sep 17 00:00:00 2001 From: Eric Shamow Date: Tue, 10 Jul 2012 15:50:27 -0600 Subject: [PATCH] Use osfamily instead of operatingsystem to determine package osfamily is slightly more forgiving, especially for RHEL-based distributions. --- manifests/init.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 02386ff..be8ff69 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -22,9 +22,9 @@ class java( anchor { 'java::begin': } anchor { 'java::end': } - case $operatingsystem { + case $::osfamily { - centos, redhat, oel: { + 'RedHat': { class { 'java::package_redhat': version => $version, @@ -35,9 +35,9 @@ class java( } - debian, ubuntu: { + 'Debian': { - case $lsbdistcodename { + case $::lsbdistcodename { squeeze, lucid: { $distribution_debian = $distribution ? { jdk => 'openjdk-6-jdk', @@ -51,7 +51,7 @@ class java( } } default: { - fail("operatingsystem distribution ${lsbdistcodename} is not supported") + fail("operatingsystem distribution ${::lsbdistcodename} is not supported") } } @@ -65,7 +65,7 @@ class java( } default: { - fail("operatingsystem ${operatingsystem} is not supported") + fail("osfamily ${::osfamily} is not supported") } }