diff --git a/README.markdown b/README.markdown index 784621e24..c4146c85c 100644 --- a/README.markdown +++ b/README.markdown @@ -18,7 +18,7 @@ Setup a new virtual host
     node default {
-      class { 'mcollective': }
+      class { 'nginx': }
       nginx::resource::vhost { 'www.puppetlabs.com':
         ensure   => present,
         www_root => '/var/www/www.puppetlabs.com',
@@ -29,7 +29,7 @@ Setup a new virtual host
 Add a Proxy Server(s)
 
    node default {
-     class { 'mcollective': }
+     class { 'nginx': }
      nginx::resource::upstream { 'puppet_rack_app':
        ensure  => present,
        members => [
diff --git a/manifests/package.pp b/manifests/package.pp
index 2751f18c7..5b9fbb6df 100644
--- a/manifests/package.pp
+++ b/manifests/package.pp
@@ -18,7 +18,7 @@
   anchor { 'nginx::package::end': }
 
   case $::operatingsystem {
-    centos,fedora,rhel: {
+    centos,fedora,rhel,redhat: {
       class { 'nginx::package::redhat':
         require => Anchor['nginx::package::begin'],
         before  => Anchor['nginx::package::end'],
diff --git a/manifests/package/redhat.pp b/manifests/package/redhat.pp
index bee254963..f44df2d58 100644
--- a/manifests/package/redhat.pp
+++ b/manifests/package/redhat.pp
@@ -16,10 +16,20 @@
 class nginx::package::redhat {
   $redhat_packages = ['nginx', 'GeoIP', 'gd', 'libXpm', 'libxslt']
 
-  $os_type = downcase($::operatingsystem)
+  if downcase($::operatingsystem) == "redhat" {
+    $os_type = "rhel"
+  } else {
+    $os_type = downcase($::operatingsystem)
+  }
+
+  if $::lsbmajdistrelease == undef {
+    $os_rel = regsubst($::operatingsystemrelease, '\..*$', '')
+  } else {
+    $os_rel = $::lsbmajdistrelease
+  }
 
   yumrepo { "nginx-release":
-    baseurl  => "http://nginx.org/packages/${os_type}/${::lsbmajdistrelease}/\$basearch/",
+    baseurl  => "http://nginx.org/packages/${os_type}/${os_rel}/\$basearch/",
     descr    => 'nginx repo',
     enabled  => '1',
     gpgcheck => '0',
diff --git a/manifests/params.pp b/manifests/params.pp
index 5ea00c189..b5c3a6ae2 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -50,7 +50,7 @@
   }
 
   $nx_daemon_user = $::operatingsystem ? {
-    /(?i-mx:debian|ubuntu)/                    => 'www-data',
-    /(?i-mx:fedora|rhel|centos|suse|opensuse)/ => 'nginx',
+    /(?i-mx:debian|ubuntu)/                           => 'www-data',
+    /(?i-mx:fedora|rhel|redhat|centos|suse|opensuse)/ => 'nginx',
   }
 }