nginx: Merge from parameterize branch

This commit is contained in:
Ossi Salmi 2016-04-18 15:31:52 +03:00
parent 55c8b7bd5f
commit a0c2c84e0d

View file

@ -1,6 +1,15 @@
# Install and configure nginx.
#
# === Parameters
#
# $chroot:
# Use chroot on OpenBSD. Defaults to true.
#
# $workers:
# Number of worker processes. Defaults to $processorcount.
#
class nginx(
$chroot=true,
$workers=$::processorcount,
) {
@ -9,6 +18,12 @@ class nginx(
$user = 'www'
$group = 'www'
$logdir = '/var/www/logs'
if ! $chroot {
Service['nginx'] {
flags => '-u',
}
}
}
'ubuntu': {
$user = 'www-data'
@ -59,10 +74,6 @@ class nginx(
service { 'nginx':
ensure => running,
enable => true,
start => $::operatingsystem ? {
'openbsd' => '/usr/sbin/nginx -u',
default => undef,
},
}
}