Merge pull request #507 from frenkel/master
Add initial OpenBSD support.
This commit is contained in:
commit
03aa252e1c
3 changed files with 34 additions and 4 deletions
|
@ -81,6 +81,14 @@ class nginx::package(
|
|||
before => Anchor['nginx::package::end'],
|
||||
}
|
||||
}
|
||||
'OpenBSD': {
|
||||
class { 'nginx::package::openbsd':
|
||||
package_name => $package_name,
|
||||
package_ensure => $package_ensure,
|
||||
require => Anchor['nginx::package::begin'],
|
||||
before => Anchor['nginx::package::end'],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
case $::operatingsystem {
|
||||
'amazon': {
|
||||
|
|
12
manifests/package/openbsd.pp
Normal file
12
manifests/package/openbsd.pp
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Class: nginx::package::openbsd
|
||||
#
|
||||
# Manage the nginx package on OpenBSD
|
||||
class nginx::package::openbsd (
|
||||
$package_name = 'nginx',
|
||||
$package_ensure = 'present'
|
||||
) {
|
||||
|
||||
package { $package_name:
|
||||
ensure => $package_ensure,
|
||||
}
|
||||
}
|
|
@ -6,6 +6,8 @@ class nginx::params {
|
|||
'daemon_user' => 'nginx',
|
||||
'pid' => '/var/run/nginx.pid',
|
||||
'root_group' => 'root',
|
||||
'log_dir' => '/var/log/nginx',
|
||||
'run_dir' => '/var/nginx',
|
||||
}
|
||||
case $::osfamily {
|
||||
'ArchLinux': {
|
||||
|
@ -31,6 +33,14 @@ class nginx::params {
|
|||
'daemon_user' => 'webservd',
|
||||
}
|
||||
}
|
||||
'OpenBSD': {
|
||||
$_module_os_overrides = {
|
||||
'daemon_user' => 'www',
|
||||
'root_group' => 'wheel',
|
||||
'log_dir' => '/var/www/logs',
|
||||
'run_dir' => '/var/www',
|
||||
}
|
||||
}
|
||||
default: {
|
||||
## For cases not covered in $::osfamily
|
||||
case $::operatingsystem {
|
||||
|
@ -50,22 +60,22 @@ class nginx::params {
|
|||
|
||||
### Referenced Variables
|
||||
$conf_dir = $_module_parameters['conf_dir']
|
||||
$log_dir = '/var/log/nginx'
|
||||
$run_dir = '/var/nginx'
|
||||
$log_dir = $_module_parameters['log_dir']
|
||||
$run_dir = $_module_parameters['run_dir']
|
||||
$temp_dir = '/tmp'
|
||||
$pid = $_module_parameters['pid']
|
||||
|
||||
$client_body_temp_path = "${run_dir}/client_body_temp"
|
||||
$daemon_user = $_module_parameters['daemon_user']
|
||||
$global_owner = 'root'
|
||||
$global_group = 'root'
|
||||
$global_group = $_module_parameters['root_group']
|
||||
$global_mode = '0644'
|
||||
$http_access_log = "${log_dir}/access.log"
|
||||
$nginx_error_log = "${log_dir}/error.log"
|
||||
$root_group = $_module_parameters['root_group']
|
||||
$proxy_temp_path = "${run_dir}/proxy_temp"
|
||||
$sites_available_owner = 'root'
|
||||
$sites_available_group = 'root'
|
||||
$sites_available_group = $_module_parameters['root_group']
|
||||
$sites_available_mode = '0644'
|
||||
$super_user = true
|
||||
### END Referenced Variables
|
||||
|
|
Loading…
Reference in a new issue