Merge pull request #14 from maestrodev/master
support operatingsystem RedHat
This commit is contained in:
commit
26c6302227
4 changed files with 17 additions and 7 deletions
|
@ -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 => [
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue