support redhat as operating system in addition to rhel

This commit is contained in:
Brett Porter 2012-09-02 00:55:34 -07:00 committed by Brett Porter
parent 85ce2c42db
commit f2a14b9961
3 changed files with 8 additions and 4 deletions

View file

@ -18,7 +18,7 @@ class nginx::package {
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'],

View file

@ -16,7 +16,11 @@
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)
}
yumrepo { "nginx-release":
baseurl => "http://nginx.org/packages/${os_type}/${::lsbmajdistrelease}/\$basearch/",

View file

@ -50,7 +50,7 @@ class nginx::params {
}
$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',
}
}