diff --git a/manifests/config.pp b/manifests/config.pp index acae8de44..c3cc98fc2 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -37,6 +37,8 @@ $http_access_log = $nginx::params::nx_http_access_log, $proxy_buffer_size = $nginx::params::nx_proxy_buffer_size, $gzip = $nginx::params::nx_gzip, + $conf_template = $nginx::params::nx_conf_template, + $proxy_conf_template = $nginx::params::nx_proxy_conf_template, ) inherits nginx::params { if $caller_module_name != $module_name { @@ -123,12 +125,12 @@ file { "${nginx::params::nx_conf_dir}/nginx.conf": ensure => file, - content => template('nginx/conf.d/nginx.conf.erb'), + content => template($conf_template), } file { "${nginx::params::nx_conf_dir}/conf.d/proxy.conf": ensure => file, - content => template('nginx/conf.d/proxy.conf.erb'), + content => template($proxy_conf_template), } file { "${nginx::config::nx_temp_dir}/nginx.d": diff --git a/manifests/init.pp b/manifests/init.pp index 05b9c0497..f47541810 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -56,6 +56,8 @@ $nginx_error_log = $nginx::params::nx_nginx_error_log, $http_access_log = $nginx::params::nx_http_access_log, $gzip = $nginx::params::nx_gzip, + $conf_template = $nginx::params::nx_conf_template, + $proxy_conf_template = $nginx::params::nx_proxy_conf_template, $nginx_vhosts = {}, $nginx_upstreams = {}, $nginx_locations = {}, @@ -139,6 +141,8 @@ nginx_error_log => $nginx_error_log, http_access_log => $http_access_log, gzip => $gzip, + conf_template => $conf_template, + proxy_conf_template => $proxy_conf_template, require => Class['nginx::package'], notify => Class['nginx::service'], } diff --git a/manifests/params.pp b/manifests/params.pp index a669d910c..1a5a73afa 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -23,6 +23,8 @@ $nx_run_dir = '/var/nginx' $nx_conf_dir = '/etc/nginx' + $nx_conf_template = 'nginx/conf.d/nginx.conf.erb' + $nx_proxy_conf_template = 'nginx/conf.d/proxy.conf.erb' $nx_confd_purge = false $nx_vhost_purge = false $nx_worker_processes = 1