Added basic support for nginx on Solaris.

This commit is contained in:
Jan Örnstedt 2014-01-30 16:41:44 +01:00
parent eeb0830b7f
commit 4a0a857a38
3 changed files with 42 additions and 0 deletions

View file

@ -53,6 +53,15 @@ class nginx::package(
before => Anchor['nginx::package::end'],
}
}
'Solaris': {
class { 'nginx::package::solaris':
package_name => $package_name,
package_source => $package_source,
package_ensure => $package_ensure,
require => Anchor['nginx::package::begin'],
before => Anchor['nginx::package::end'],
}
}
default: {
case $::operatingsystem {
'amazon': {

View file

@ -0,0 +1,29 @@
# Class: nginx::package::solaris
#
# This module manages NGINX package installation on solaris based systems
#
# Parameters:
#
# *package_name*
# Needs to be specified. SFEnginx,CSWnginx depending on where you get it.
#
# *package_source*
# Needed in case of Solaris 10.
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
# This class file is not called directly
class nginx::package::solaris(
$package_name = undef,
$package_source = '',
$package_ensure = 'present'
){
package { $package_name:
ensure => $package_ensure,
source => $package_source
}
}

View file

@ -68,16 +68,19 @@ class nginx::params {
$nx_logdir = $::kernel ? {
/(?i-mx:linux)/ => '/var/log/nginx',
/(?i-mx:sunos)/ => '/var/log/nginx',
}
$nx_pid = $::kernel ? {
/(?i-mx:linux)/ => '/var/run/nginx.pid',
/(?i-mx:sunos)/ => '/var/run/nginx.pid',
}
if $::osfamily {
$nx_daemon_user = $::osfamily ? {
/(?i-mx:redhat|suse|gentoo|linux)/ => 'nginx',
/(?i-mx:debian)/ => 'www-data',
/(?i-mx:solaris)/ => 'webservd',
}
} else {
warning('$::osfamily not defined. Support for $::operatingsystem is deprecated')
@ -85,6 +88,7 @@ class nginx::params {
$nx_daemon_user = $::operatingsystem ? {
/(?i-mx:debian|ubuntu)/ => 'www-data',
/(?i-mx:fedora|rhel|redhat|centos|scientific|suse|opensuse|amazon|gentoo|oraclelinux)/ => 'nginx',
/(?i-mx:debian|solaris)/ => 'webservd',
}
}