Fix deprecated variable names
This commit is contained in:
parent
fc331e8173
commit
0191a2fe28
13 changed files with 68 additions and 71 deletions
|
@ -14,7 +14,7 @@
|
||||||
#
|
#
|
||||||
# This class file is not called directly
|
# This class file is not called directly
|
||||||
class nginx::package::debian {
|
class nginx::package::debian {
|
||||||
$operatingsystem_lowercase = inline_template('<%= operatingsystem.downcase %>')
|
$operatingsystem_lowercase = inline_template('<%= @operatingsystem.downcase %>')
|
||||||
|
|
||||||
package { 'nginx':
|
package { 'nginx':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
user <%= scope.lookupvar('nginx::config::nx_daemon_user') %>;
|
user <%= scope.lookupvar('nginx::config::nx_daemon_user') %>;
|
||||||
worker_processes <%= worker_processes %>;
|
worker_processes <%= @worker_processes %>;
|
||||||
|
|
||||||
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/error.log;
|
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/error.log;
|
||||||
pid <%= scope.lookupvar('nginx::params::nx_pid')%>;
|
pid <%= scope.lookupvar('nginx::params::nx_pid')%>;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections <%= worker_connections -%>;
|
worker_connections <%= @worker_connections -%>;
|
||||||
<% if scope.lookupvar('nginx::params::nx_multi_accept') == 'on' %>multi_accept on;<% end -%>
|
<% if scope.lookupvar('nginx::params::nx_multi_accept') == 'on' %>multi_accept on;<% end -%>
|
||||||
<% if scope.lookupvar('nginx::params::nx_events_use') %>use <%= scope.lookupvar('nginx::params::nx_events_use')%>;<% end -%>
|
<% if scope.lookupvar('nginx::params::nx_events_use') %>use <%= scope.lookupvar('nginx::params::nx_events_use')%>;<% end -%>
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ http {
|
||||||
|
|
||||||
sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>;
|
sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>;
|
||||||
|
|
||||||
server_tokens <%= server_tokens %>;
|
server_tokens <%= @server_tokens %>;
|
||||||
<% if scope.lookupvar('nginx::params::nx_tcp_nopush') == 'on' %>tcp_nopush on;<% end %>
|
<% if scope.lookupvar('nginx::params::nx_tcp_nopush') == 'on' %>tcp_nopush on;<% end %>
|
||||||
|
|
||||||
types_hash_max_size <%= scope.lookupvar('nginx::params::nx_types_hash_max_size')%>;
|
types_hash_max_size <%= scope.lookupvar('nginx::params::nx_types_hash_max_size')%>;
|
||||||
|
@ -29,13 +29,13 @@ http {
|
||||||
keepalive_timeout <%= scope.lookupvar('nginx::params::nx_keepalive_timeout')%>;
|
keepalive_timeout <%= scope.lookupvar('nginx::params::nx_keepalive_timeout')%>;
|
||||||
tcp_nodelay <%= scope.lookupvar('nginx::params::nx_tcp_nodelay')%>;
|
tcp_nodelay <%= scope.lookupvar('nginx::params::nx_tcp_nodelay')%>;
|
||||||
|
|
||||||
<% if scope.lookupvar('nginx::params::nx_gzip') == 'on' %>
|
<% if scope.lookupvar('nginx::params::nx_gzip') == 'on' %>
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<% if proxy_cache_path -%>
|
<% if @proxy_cache_path -%>
|
||||||
proxy_cache_path <%= proxy_cache_path %> levels=<%= proxy_cache_levels %> keys_zone=<%= proxy_cache_keys_zone %> max_size=<%= proxy_cache_max_size %> inactive=<%= proxy_cache_inactive %>;
|
proxy_cache_path <%= @proxy_cache_path %> levels=<%= @proxy_cache_levels %> keys_zone=<%= @proxy_cache_keys_zone %> max_size=<%= @proxy_cache_max_size %> inactive=<%= @proxy_cache_inactive %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
|
|
@ -6,5 +6,5 @@ proxy_send_timeout <%= scope.lookupvar('nginx::params::nx_proxy_send_timeou
|
||||||
proxy_read_timeout <%= scope.lookupvar('nginx::params::nx_proxy_read_timeout') %>;
|
proxy_read_timeout <%= scope.lookupvar('nginx::params::nx_proxy_read_timeout') %>;
|
||||||
proxy_buffers <%= scope.lookupvar('nginx::params::nx_proxy_buffers') %>;
|
proxy_buffers <%= scope.lookupvar('nginx::params::nx_proxy_buffers') %>;
|
||||||
proxy_http_version <%= @proxy_http_version %>;
|
proxy_http_version <%= @proxy_http_version %>;
|
||||||
<% proxy_set_header.each do |header| %>
|
<% @proxy_set_header.each do |header| %>
|
||||||
proxy_set_header <%= header %>;<% end %>
|
proxy_set_header <%= header %>;<% end %>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
upstream <%= name %> {
|
upstream <%= @name %> {
|
||||||
<% if @upstream_cfg_prepend -%><% upstream_cfg_prepend.sort_by{|k,v| k}.each do |key,value| -%>
|
<% if @upstream_cfg_prepend -%><% upstream_cfg_prepend.sort_by{|k,v| k}.each do |key,value| -%>
|
||||||
<%= key %> <%= value %>;<% end -%><% end -%>
|
<%= key %> <%= value %>;<% end -%><% end -%>
|
||||||
<% members.each do |i| %>
|
<% @members.each do |i| %>
|
||||||
server <%= i %>;<% end %>
|
server <%= i %>;<% end %>
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@ include <%= file %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
}
|
}
|
||||||
<% if rewrite_www_to_non_www -%>
|
<% if @rewrite_www_to_non_www -%>
|
||||||
server {
|
server {
|
||||||
listen <%= listen_ip %>;
|
listen <%= @listen_ip %>;
|
||||||
server_name www.<%= name.gsub(/^www\./, '') %>;
|
server_name www.<%= @name.gsub(/^www\./, '') %>;
|
||||||
rewrite ^ http://<%= name.gsub(/^www\./, '') %>$uri permanent;
|
rewrite ^ http://<%= @name.gsub(/^www\./, '') %>$uri permanent;
|
||||||
}
|
}
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
server {
|
server {
|
||||||
listen <%= listen_ip %>:<%= listen_port %><% if @listen_options %> <%= listen_options %><% end %>;
|
listen <%= @listen_ip %>:<%= @listen_port %><% if @listen_options %> <%= @listen_options %><% end %>;
|
||||||
<% # check to see if ipv6 support exists in the kernel before applying %>
|
<% # check to see if ipv6 support exists in the kernel before applying %>
|
||||||
<% if ipv6_enable == 'true' && (defined? ipaddress6) %>
|
<% if @ipv6_enable == 'true' && (defined? ipaddress6) %>
|
||||||
listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> <% if @ipv6_listen_options %><%= ipv6_listen_options %><% end %> ipv6only=on;
|
listen [<%= ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %> ipv6only=on;
|
||||||
<% end %>
|
<% end %>
|
||||||
server_name <%= rewrite_www_to_non_www ? name.gsub(/^www\./, '') : server_name.join(" ") %>;
|
server_name <%= @rewrite_www_to_non_www ? @name.gsub(/^www\./, '') : @server_name.join(" ") %>;
|
||||||
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/<%= name %>.access.log;
|
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/<%= @name %>.access.log;
|
||||||
<% if defined? auth_basic -%>
|
<% if defined? auth_basic -%>
|
||||||
auth_basic "<%= auth_basic %>";
|
auth_basic "<%= @auth_basic %>";
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if defined? auth_basic_user_file -%>
|
<% if defined? auth_basic_user_file -%>
|
||||||
auth_basic_user_file <%= auth_basic_user_file %>;
|
auth_basic_user_file <%= @auth_basic_user_file %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<% proxy_set_header.each do |header| -%>
|
<% @proxy_set_header.each do |header| -%>
|
||||||
proxy_set_header <%= header %>;
|
proxy_set_header <%= header %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @rewrite_to_https -%>
|
<% if @rewrite_to_https -%>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
location <%= location %> {
|
location <%= @location %> {
|
||||||
<% if @location_cfg_prepend -%><% location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
|
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
|
||||||
<%= key %> <%= value %>;<% end -%><% end -%>
|
<%= key %> <%= value %>;<% end -%><% end -%>
|
||||||
alias <%= location_alias %>;
|
alias <%= @location_alias %>;
|
||||||
<% if @location_cfg_append -%><% location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
||||||
<%= key %> <%= value %>;<% end -%><% end -%>
|
<%= key %> <%= value %>;<% end -%><% end -%>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,21 @@
|
||||||
location <%= location %> {
|
location <%= @location %> {
|
||||||
<% if @location_cfg_prepend -%><% location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
|
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
|
||||||
<%= key %> <%= value %>;
|
<%= key %> <%= value %>;
|
||||||
<% end -%><% end -%>
|
<% end -%><% end -%>
|
||||||
root <%= www_root %>;
|
root <%= @www_root %>;
|
||||||
<% if @try_files -%>
|
<% if @try_files -%>
|
||||||
try_files <% try_files.each do |try| -%> <%= try %> <% end -%>;
|
try_files <% @try_files.each do |try| -%> <%= try %> <% end -%>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if index_files -%>
|
<% if @index_files -%>
|
||||||
index <% index_files.each do |i| %> <%= i %><% end %>;
|
index <% @index_files.each do |i| %> <%= i %><% end %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if defined? auth_basic -%>
|
<% if defined? auth_basic -%>
|
||||||
auth_basic "<%= auth_basic %>";
|
auth_basic "<%= @auth_basic %>";
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if defined? auth_basic_user_file -%>
|
<% if defined? auth_basic_user_file -%>
|
||||||
auth_basic_user_file <%= auth_basic_user_file %>;
|
auth_basic_user_file <%= @auth_basic_user_file %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @location_cfg_append -%><% location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
||||||
<%= key %> <%= value %>;
|
<%= key %> <%= value %>;
|
||||||
<% end -%><% end -%>
|
<% end -%><% end -%>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
location <%= location %> {
|
location <%= @location %> {
|
||||||
<% location_custom_cfg.sort_by {|k,v| k}.each do |key,value| -%>
|
<% @location_custom_cfg.sort_by {|k,v| k}.each do |key,value| -%>
|
||||||
<%= key %> <%= value %>;
|
<%= key %> <%= value %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
location <%= location %> {
|
location <%= @location %> {
|
||||||
root <%= www_root %>;
|
root <%= @www_root %>;
|
||||||
include <%= fastcgi_params %>;
|
include <%= @fastcgi_params %>;
|
||||||
fastcgi_pass <%= fastcgi %>;
|
fastcgi_pass <%= @fastcgi %>;
|
||||||
<% unless fastcgi_script == :undef %>
|
<% unless @fastcgi_script == :undef %>
|
||||||
fastcgi_param SCRIPT_FILENAME <%= fastcgi_script %>;
|
fastcgi_param SCRIPT_FILENAME <%= @fastcgi_script %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
location <%= location %> {
|
location <%= @location %> {
|
||||||
<% if @location_cfg_prepend -%><% location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
|
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
|
||||||
<%= key %> <%= value %>;
|
<%= key %> <%= value %>;
|
||||||
<% end -%><% end -%>
|
<% end -%><% end -%>
|
||||||
<% if proxy_cache -%>
|
<% if @proxy_cache -%>
|
||||||
proxy_cache <%= proxy_cache %>;
|
proxy_cache <%= @proxy_cache %>;
|
||||||
proxy_cache_valid <%= proxy_cache_valid %>;
|
proxy_cache_valid <%= @proxy_cache_valid %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
proxy_pass <%= proxy %>;
|
proxy_pass <%= @proxy %>;
|
||||||
proxy_read_timeout <%= proxy_read_timeout %>;
|
proxy_read_timeout <%= @proxy_read_timeout %>;
|
||||||
<% if @location_cfg_append -%><% location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
||||||
<%= key %> <%= value %>;
|
<%= key %> <%= value %>;
|
||||||
<% end -%><% end -%>
|
<% end -%><% end -%>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
location <%= location %> {
|
location <%= @location %> {
|
||||||
<% if @location_cfg_prepend -%><% location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
|
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
|
||||||
<%= key %> <%= value %>;<% end -%><% end -%>
|
<%= key %> <%= value %>;<% end -%><% end -%>
|
||||||
stub_status on;
|
stub_status on;
|
||||||
<% if @location_cfg_append -%><% location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
||||||
<%= key %> <%= value %>;<% end -%><% end -%>
|
<%= key %> <%= value %>;<% end -%><% end -%>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,25 @@
|
||||||
server {
|
server {
|
||||||
listen <%= listen_ip %>:<%= ssl_port %> ssl<% if spdy == 'on' %> spdy<% end %><% if @listen_options %><%= listen_options %><% end %>;
|
listen <%= @listen_ip %>:<%= @ssl_port %> ssl<% if @spdy == 'on' %> spdy<% end %><% if @listen_options %><%= @listen_options %><% end %>;
|
||||||
<% if ipv6_enable == 'true' && (defined? ipaddress6) %>
|
<% if @ipv6_enable == 'true' && (defined? ipaddress6) %>
|
||||||
listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> <% if @ipv6_listen_options %><%= ipv6_listen_options %><% end %> ipv6only=on;
|
listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %> ipv6only=on;
|
||||||
<% end %>
|
<% end %>
|
||||||
server_name <%= rewrite_www_to_non_www ? name.gsub(/^www\./, '') : server_name.join(" ") %>;
|
server_name <%= @rewrite_www_to_non_www ? @name.gsub(/^www\./, '') : @server_name.join(" ") %>;
|
||||||
|
|
||||||
ssl on;
|
ssl on;
|
||||||
|
|
||||||
ssl_certificate <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= name.gsub(' ', '_') %>.crt;
|
ssl_certificate <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.crt;
|
||||||
ssl_certificate_key <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= name.gsub(' ', '_') %>.key;
|
ssl_certificate_key <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.key;
|
||||||
ssl_session_cache shared:SSL:10m;
|
ssl_session_cache shared:SSL:10m;
|
||||||
ssl_session_timeout 5m;
|
ssl_session_timeout 5m;
|
||||||
ssl_protocols <%= ssl_protocols %>;
|
ssl_protocols <%= @ssl_protocols %>;
|
||||||
ssl_ciphers <%= ssl_ciphers %>;
|
ssl_ciphers <%= @ssl_ciphers %>;
|
||||||
ssl_prefer_server_ciphers on;
|
ssl_prefer_server_ciphers on;
|
||||||
<% if auth_basic != :undef -%>
|
<% if @auth_basic != :undef -%>
|
||||||
auth_basic "<%= auth_basic %>";
|
auth_basic "<%= @auth_basic %>";
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if auth_basic_user_file != :undef -%>
|
<% if @auth_basic_user_file != :undef -%>
|
||||||
auth_basic_user_file <%= auth_basic_user_file %>;
|
auth_basic_user_file <%= @auth_basic_user_file %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/ssl-<%= name.gsub(' ', '_') %>.access.log;
|
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/ssl-<%= @name.gsub(' ', '_') %>.access.log;
|
||||||
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/ssl-<%= name.gsub(' ', '_') %>.error.log;
|
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/ssl-<%= @name.gsub(' ', '_') %>.error.log;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue