From a0258920d19143aef36b832bd9126f14a0c616ed Mon Sep 17 00:00:00 2001 From: Matthew Haughton Date: Sun, 10 Nov 2013 17:59:11 -0500 Subject: [PATCH] Fix Puppet 3.2.x deprecation warnings --- templates/conf.d/upstream.erb | 2 +- templates/mailhost/mailhost.erb | 22 +++++++++++----------- templates/mailhost/mailhost_ssl.erb | 18 +++++++++--------- templates/vhost/vhost_header.erb | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/templates/conf.d/upstream.erb b/templates/conf.d/upstream.erb index c5220588c..785f61345 100644 --- a/templates/conf.d/upstream.erb +++ b/templates/conf.d/upstream.erb @@ -1,5 +1,5 @@ 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 -%> <% @members.each do |i| %> diff --git a/templates/mailhost/mailhost.erb b/templates/mailhost/mailhost.erb index 66a8a20c2..6cd05e798 100644 --- a/templates/mailhost/mailhost.erb +++ b/templates/mailhost/mailhost.erb @@ -1,18 +1,18 @@ 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 %> - <% if ipv6_enable && (defined? @ipaddress6) %> - listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %><% if @ipv6_listen_options %> <%= ipv6_listen_options %><% end %> ipv6only=on; + <% if @ipv6_enable && (defined? @ipaddress6) %> + listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %><% if @ipv6_listen_options %> <%= @ipv6_listen_options %><% end %> ipv6only=on; <% end %> - server_name <%= server_name.join(" ") %>; - protocol <%= protocol %>; - xclient <%= xclient %>; - auth_http <%= auth_http %>; - starttls <%= starttls %>; - <% if starttls == 'on' || starttls == 'only' %> - ssl_certificate <%= ssl_cert %>; - ssl_certificate_key <%= ssl_key %>; + server_name <%= @server_name.join(" ") %>; + protocol <%= @protocol %>; + xclient <%= @xclient %>; + auth_http <%= @auth_http %>; + starttls <%= @starttls %>; + <% if @starttls == 'on' || @starttls == 'only' %> + ssl_certificate <%= @ssl_cert %>; + ssl_certificate_key <%= @ssl_key %>; ssl_session_timeout 5m; diff --git a/templates/mailhost/mailhost_ssl.erb b/templates/mailhost/mailhost_ssl.erb index d3ac4047d..0fd53dff4 100644 --- a/templates/mailhost/mailhost_ssl.erb +++ b/templates/mailhost/mailhost_ssl.erb @@ -1,18 +1,18 @@ server { - listen <%= ssl_port %>; + listen <%= @ssl_port %>; <% # check to see if ipv6 support exists in the kernel before applying %> - <% if ipv6_enable && (defined? @ipaddress6) %> - listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> <% if @ipv6_listen_options %><%= ipv6_listen_options %><% end %> ipv6only=on; + <% if @ipv6_enable && (defined? @ipaddress6) %> + listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %> ipv6only=on; <% end %> - server_name <%= server_name.join(" ") %>; - protocol <%= protocol %>; - xclient <%= xclient %>; - auth_http <%= auth_http %>; + server_name <%= @server_name.join(" ") %>; + protocol <%= @protocol %>; + xclient <%= @xclient %>; + auth_http <%= @auth_http %>; ssl on; - ssl_certificate <%= ssl_cert %>; - ssl_certificate_key <%= ssl_key %>; + ssl_certificate <%= @ssl_cert %>; + ssl_certificate_key <%= @ssl_key %>; ssl_session_timeout 5m; diff --git a/templates/vhost/vhost_header.erb b/templates/vhost/vhost_header.erb index 1a19ee7e5..231160d52 100644 --- a/templates/vhost/vhost_header.erb +++ b/templates/vhost/vhost_header.erb @@ -14,7 +14,7 @@ server { <%# make sure that allow comes before deny by forcing the allow key (if it -%> <%# exists) to be first in the output order. The hash keys also need to be -%> <%# sorted so that the ordering is stable. -%> -<% if @vhost_cfg_prepend -%><% vhost_cfg_prepend.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> +<% if @vhost_cfg_prepend -%><% @vhost_cfg_prepend.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> <%= key %> <%= value %>; <% end -%><% end -%> <% if @root -%>