Fixing merge from latest code on master plus guruhub
This commit is contained in:
commit
e9fce56092
4 changed files with 21 additions and 11 deletions
|
@ -14,10 +14,10 @@
|
||||||
#
|
#
|
||||||
# This class file is not called directly
|
# This class file is not called directly
|
||||||
class nginx::config(
|
class nginx::config(
|
||||||
$worker_processes = $nginx::params::nx_worker_processes,
|
$worker_processes = $nginx::params::nx_worker_processes,
|
||||||
$worker_connections = $nginx::params::nx_worker_connections,
|
$worker_connections = $nginx::params::nx_worker_connections,
|
||||||
$proxy_set_header = $nginx::params::nx_proxy_set_header,
|
$proxy_set_header = $nginx::params::nx_proxy_set_header,
|
||||||
$confd_purge = $nginx::params::nx_confd_purge,
|
$confd_purge = $nginx::params::nx_confd_purge,
|
||||||
) inherits nginx::params {
|
) inherits nginx::params {
|
||||||
File {
|
File {
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
|
@ -34,6 +34,7 @@ class nginx::config(
|
||||||
}
|
}
|
||||||
if $confd_purge == true {
|
if $confd_purge == true {
|
||||||
File["${nginx::params::nx_conf_dir}/conf.d"] {
|
File["${nginx::params::nx_conf_dir}/conf.d"] {
|
||||||
|
ignore => "vhost_autogen.conf",
|
||||||
purge => true,
|
purge => true,
|
||||||
recurse => true,
|
recurse => true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,11 +29,12 @@
|
||||||
# include nginx
|
# include nginx
|
||||||
# }
|
# }
|
||||||
class nginx (
|
class nginx (
|
||||||
$worker_processes = $nginx::params::nx_worker_processes,
|
$worker_processes = $nginx::params::nx_worker_processes,
|
||||||
$worker_connections = $nginx::params::nx_worker_connections,
|
$worker_connections = $nginx::params::nx_worker_connections,
|
||||||
$proxy_set_header = $nginx::params::nx_proxy_set_header,
|
$proxy_set_header = $nginx::params::nx_proxy_set_header,
|
||||||
$confd_purge = $nginx::params::nx_confd_purge,
|
$confd_purge = $nginx::params::nx_confd_purge,
|
||||||
$configtest_enable = $nginx::params::nx_configtest_enable,
|
$configtest_enable = $nginx::params::nx_configtest_enable,
|
||||||
|
$service_restart = $nginx::params::nx_service_restrart,
|
||||||
) inherits nginx::params {
|
) inherits nginx::params {
|
||||||
|
|
||||||
include stdlib
|
include stdlib
|
||||||
|
@ -53,6 +54,7 @@ class nginx (
|
||||||
|
|
||||||
class { 'nginx::service':
|
class { 'nginx::service':
|
||||||
configtest_enable => $configtest_enable,
|
configtest_enable => $configtest_enable,
|
||||||
|
service_restart => $service_restart,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Allow the end user to establish relationships to the "main" class
|
# Allow the end user to establish relationships to the "main" class
|
||||||
|
|
|
@ -19,7 +19,6 @@ class nginx::params {
|
||||||
|
|
||||||
$nx_conf_dir = '/etc/nginx'
|
$nx_conf_dir = '/etc/nginx'
|
||||||
$nx_confd_purge = false
|
$nx_confd_purge = false
|
||||||
$nx_configtest_enable = false
|
|
||||||
$nx_worker_processes = 1
|
$nx_worker_processes = 1
|
||||||
$nx_worker_connections = 1024
|
$nx_worker_connections = 1024
|
||||||
$nx_multi_accept = off
|
$nx_multi_accept = off
|
||||||
|
@ -55,4 +54,11 @@ class nginx::params {
|
||||||
/(?i-mx:debian|ubuntu)/ => 'www-data',
|
/(?i-mx:debian|ubuntu)/ => 'www-data',
|
||||||
/(?i-mx:fedora|rhel|redhat|centos|suse|opensuse)/ => 'nginx',
|
/(?i-mx:fedora|rhel|redhat|centos|suse|opensuse)/ => 'nginx',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Service restart after Nginx 0.7.53 could also be just "/path/to/nginx/bin -s HUP"
|
||||||
|
# Some init scripts do a configtest, some don't. If configtest_enable it's true
|
||||||
|
# then service restart will take $nx_service_restart value, forcing configtest.
|
||||||
|
$nx_configtest_enable = false
|
||||||
|
$nx_service_restart = "/etc/init.d/nginx configtest && /etc/init.d/nginx restart"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
# This class file is not called directly
|
# This class file is not called directly
|
||||||
class nginx::service(
|
class nginx::service(
|
||||||
$configtest_enable = $nginx::params::nx_configtest_enable,
|
$configtest_enable = $nginx::params::nx_configtest_enable,
|
||||||
|
$service_restart = $nginx::params::nx_service_restart,
|
||||||
) {
|
) {
|
||||||
exec { 'rebuild-nginx-vhosts':
|
exec { 'rebuild-nginx-vhosts':
|
||||||
command => "/bin/cat ${nginx::params::nx_temp_dir}/nginx.d/* > ${nginx::params::nx_conf_dir}/conf.d/vhost_autogen.conf",
|
command => "/bin/cat ${nginx::params::nx_temp_dir}/nginx.d/* > ${nginx::params::nx_conf_dir}/conf.d/vhost_autogen.conf",
|
||||||
|
@ -31,7 +32,7 @@ class nginx::service(
|
||||||
}
|
}
|
||||||
if $configtest_enable == true {
|
if $configtest_enable == true {
|
||||||
Service["nginx"] {
|
Service["nginx"] {
|
||||||
restart => "/etc/init.d/nginx configtest && /etc/init.d/nginx restart",
|
restart => $service_restart,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue