Skip to content

Commit

Permalink
Merge pull request #175 from 3flex/fix-template-deprecations
Browse files Browse the repository at this point in the history
(maint) Fix Puppet 3.2.x deprecation warnings
  • Loading branch information
James Fryman committed Dec 9, 2013
2 parents 7c16742 + a025892 commit 4ae2f81
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion templates/conf.d/upstream.erb
Original file line number Diff line number Diff line change
@@ -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| %>
Expand Down
22 changes: 11 additions & 11 deletions templates/mailhost/mailhost.erb
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
18 changes: 9 additions & 9 deletions templates/mailhost/mailhost_ssl.erb
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion templates/vhost/vhost_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
Expand Down

0 comments on commit 4ae2f81

Please sign in to comment.