Merge pull request #14 from maestrodev/master

support operatingsystem RedHat
This commit is contained in:
James Fryman 2012-09-17 10:26:55 -07:00
commit 26c6302227
4 changed files with 17 additions and 7 deletions

View file

@ -18,7 +18,7 @@ Setup a new virtual host
<pre>
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)
<pre>
node default {
class { 'mcollective': }
class { 'nginx': }
nginx::resource::upstream { 'puppet_rack_app':
ensure => present,
members => [

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,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',

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',
}
}