Skip to content

Commit 908c783

Browse files
authored
Merge pull request #39 from hubspotdevops/fix_puppet4
Fix the rest
2 parents 70e4b7e + ad44a8e commit 908c783

11 files changed

+81
-81
lines changed

templates/conf.d/upstream.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
upstream <%= name %> {
2-
<% if @upstream_cfg_prepend -%><% upstream_cfg_prepend.sort_by{|k,v| k}.each do |key,value| -%>
1+
upstream <%= @name %> {
2+
<% if @upstream_cfg_prepend -%><% @upstream_cfg_prepend.sort_by{|k,v| k}.each do |key,value| -%>
33
<%= key %> <%= value %><% if key[-1,1] != '}' %>;<% end %>
44
<% end -%><% end -%>
5-
<% members.each do |i| %>
5+
<% @members.each do |i| %>
66
server <%= i %>;<% end %>
77
}

templates/mailhost/mailhost.erb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11

22
server {
3-
listen <%= listen_ip %>:<%= listen_port %> <% if @listen_options %><%= listen_options %><% end %>;
3+
listen <%= @listen_ip %>:<%= @listen_port %> <% if @listen_options %><%= @listen_options %><% end %>;
44
<% # check to see if ipv6 support exists in the kernel before applying %>
5-
<% if ipv6_enable && (defined? @ipaddress6) %>
6-
listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> <% if @ipv6_listen_options %><%= ipv6_listen_options %><% end %> ipv6only=on;
5+
<% if @ipv6_enable && (defined? @ipaddress6) %>
6+
listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %> ipv6only=on;
77
<% end %>
8-
server_name <%= server_name.join(" ") %>;
9-
protocol <%= protocol %>;
10-
xclient <%= xclient %>;
11-
auth_http <%= auth_http %>;
12-
starttls <%= starttls %>;
13-
<% if starttls == 'on' || starttls == 'only' %>
14-
ssl_certificate <%= ssl_cert %>;
15-
ssl_certificate_key <%= ssl_key %>;
8+
server_name <%= @server_name.join(" ") %>;
9+
protocol <%= @protocol %>;
10+
xclient <%= @xclient %>;
11+
auth_http <%= @auth_http %>;
12+
starttls <%= @starttls %>;
13+
<% if @starttls == 'on' || @starttls == 'only' %>
14+
ssl_certificate <%= @ssl_cert %>;
15+
ssl_certificate_key <%= @ssl_key %>;
1616

1717
ssl_session_timeout 5m;
1818

templates/mailhost/mailhost_ssl.erb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11

22
server {
3-
listen <%= ssl_port %>;
3+
listen <%= @ssl_port %>;
44
<% # check to see if ipv6 support exists in the kernel before applying %>
5-
<% if ipv6_enable && (defined? @ipaddress6) %>
6-
listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> <% if @ipv6_listen_options %><%= ipv6_listen_options %><% end %> ipv6only=on;
5+
<% if @ipv6_enable && (defined? @ipaddress6) %>
6+
listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %> ipv6only=on;
77
<% end %>
8-
server_name <%= server_name.join(" ") %>;
9-
protocol <%= protocol %>;
10-
xclient <%= xclient %>;
11-
auth_http <%= auth_http %>;
8+
server_name <%= @server_name.join(" ") %>;
9+
protocol <%= @protocol %>;
10+
xclient <%= @xclient %>;
11+
auth_http <%= @auth_http %>;
1212

1313
ssl on;
14-
ssl_certificate <%= ssl_cert %>;
15-
ssl_certificate_key <%= ssl_key %>;
14+
ssl_certificate <%= @ssl_cert %>;
15+
ssl_certificate_key <%= @ssl_key %>;
1616

1717
ssl_session_timeout 5m;
1818

templates/vhost/vhost_footer.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
include <%= file %>;
33
<% end -%><% end -%>
44

5-
<% if @vhost_cfg_append -%><% vhost_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
5+
<% if @vhost_cfg_append -%><% @vhost_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
66
<%= key %> <%= value %><% if key[-1,1] != '}' %>;<% end %>
77
<% end -%><% end -%>
88

99
}
1010

11-
<% if rewrite_www_to_non_www %>
11+
<% if @rewrite_www_to_non_www %>
1212
server {
13-
listen <%= listen_ip %>;
14-
server_name www.<%= name.gsub(/^www\./, '') %>;
15-
rewrite ^ http://<%= name.gsub(/^www\./, '') %>$uri permanent;
13+
listen <%= @listen_ip %>;
14+
server_name www.<%= @name.gsub(/^www\./, '') %>;
15+
rewrite ^ http://<%= @name.gsub(/^www\./, '') %>$uri permanent;
1616
}
1717
<% end %>

templates/vhost/vhost_header.erb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
server {
2-
<% if @vhost_cfg_prepend -%><% vhost_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
2+
<% if @vhost_cfg_prepend -%><% @vhost_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
33
<%= key %> <%= value %>;
44
<% end -%><% end -%>
55

6-
listen <%= listen_ip %>:<%= listen_port %> <% if @listen_options %><%= listen_options %><% end %>;
6+
listen <%= @listen_ip %>:<%= @listen_port %> <% if @listen_options %><%= @listen_options %><% end %>;
77
<% # check to see if ipv6 support exists in the kernel before applying %>
8-
<% if ipv6_enable == 'true' && (defined? ipaddress6) %>
9-
listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> <% if @ipv6_listen_options %><%= ipv6_listen_options %><% end %> ipv6only=on;
8+
<% if @ipv6_enable == 'true' && (defined? @ipaddress6) %>
9+
listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %> ipv6only=on;
1010
<% end %>
11-
server_name <%= rewrite_www_to_non_www ? name.gsub(/^www\./, '') : server_name.join(" ") %>;
11+
server_name <%= @rewrite_www_to_non_www ? @name.gsub(/^www\./, '') : @server_name.join(" ") %>;
1212
access_log <%= @logdir %>/<%= @access_log %>;
13-
<% if defined? auth_basic -%>
14-
auth_basic "<%= auth_basic %>";
13+
<% if defined? @auth_basic -%>
14+
auth_basic "<%= @auth_basic %>";
1515
<% end -%>
16-
<% if defined? auth_basic_user_file -%>
17-
auth_basic_user_file <%= auth_basic_user_file %>;
16+
<% if defined? @auth_basic_user_file -%>
17+
auth_basic_user_file <%= @auth_basic_user_file %>;
1818
<% end -%>
1919

20-
<% proxy_set_header.each do |header| %>
20+
<% @proxy_set_header.each do |header| %>
2121
proxy_set_header <%= header %>;<% end %>
2222
<% if @rewrite_to_https %>
2323
if ($ssl_protocol = "") {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
location <%= location %> {
2-
<% if @location_cfg_prepend -%><% location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
1+
location <%= @location %> {
2+
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
33
<%= key %> <%= value %><% if key[-1,1] != '}' %>;<% end %>
44
<% end -%><% end -%>
5-
alias <%= location_alias %>;
6-
<% if @location_cfg_append -%><% location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
5+
alias <%= @location_alias %>;
6+
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
77
<%= key %> <%= value %><% if key[-1,1] != '}' %>;<% end %>
88
<% end -%><% end -%>
99
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
location <%= location %> {
2-
<% if @location_cfg_prepend -%><% location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
1+
location <%= @location %> {
2+
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
33
<%= key %> <%= value %><% if key[-1,1] != '}' %>;<% end %>
44
<% end -%><% end -%>
5-
root <%= www_root %>;
5+
root <%= @www_root %>;
66
<% if @try_files -%>
7-
try_files <% try_files.each do |try| -%> <%= try %> <% end -%>;
7+
try_files <% @try_files.each do |try| -%> <%= try %> <% end -%>;
88
<% end -%>
9-
<% if index_files -%>
10-
index <% index_files.each do |i| %> <%= i %><% end %>;
9+
<% if @index_files -%>
10+
index <% @index_files.each do |i| %> <%= i %><% end %>;
1111
<% end -%>
12-
<% if defined? auth_basic -%>
13-
auth_basic "<%= auth_basic %>";
12+
<% if defined? @auth_basic -%>
13+
auth_basic "<%= @auth_basic %>";
1414
<% end -%>
15-
<% if defined? auth_basic_user_file -%>
16-
auth_basic_user_file <%= auth_basic_user_file %>;
15+
<% if defined? @auth_basic_user_file -%>
16+
auth_basic_user_file <%= @auth_basic_user_file %>;
1717
<% end -%>
18-
<% if @location_cfg_append -%><% location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
18+
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
1919
<%= key %> <%= value %><% if key[-1,1] != '}' %>;<% end %>
2020
<% end -%><% end -%>
2121
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
location <%= location %> {
2-
root <%= www_root %>;
3-
include <%= fastcgi_params %>;
4-
fastcgi_pass <%= fastcgi %>;
5-
<% unless fastcgi_script == :undef %>
6-
fastcgi_param SCRIPT_FILENAME <%= fastcgi_script %>;
1+
location <%= @location %> {
2+
root <%= @www_root %>;
3+
include <%= @fastcgi_params %>;
4+
fastcgi_pass <%= @fastcgi %>;
5+
<% unless @fastcgi_script == :undef %>
6+
fastcgi_param SCRIPT_FILENAME <%= @fastcgi_script %>;
77
<% end -%>
88
}
99

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
location <%= location %> {
2-
<% if @location_cfg_prepend -%><% location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
1+
location <%= @location %> {
2+
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
33
<%= key %> <%= value %>;
44
<% end -%><% end -%>
5-
<% if proxy_cache -%>
6-
proxy_cache <%= proxy_cache %>;
7-
proxy_cache_valid <%= proxy_cache_valid %>;
5+
<% if @proxy_cache -%>
6+
proxy_cache <%= @proxy_cache %>;
7+
proxy_cache_valid <%= @proxy_cache_valid %>;
88
<% end -%>
9-
proxy_pass <%= proxy %>;
10-
proxy_read_timeout <%= proxy_read_timeout %>;
11-
<% if @location_cfg_append -%><% location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
9+
proxy_pass <%= @proxy %>;
10+
proxy_read_timeout <%= @proxy_read_timeout %>;
11+
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
1212
<%= key %> <%= value %><% if key[-1,1] != '}' %>;<% end %>
1313
<% end -%><% end -%>
1414
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
location <%= location %> {
2-
<% if @location_cfg_prepend -%><% location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
1+
location <%= @location %> {
2+
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
33
<%= key %> <%= value %>;<% end -%><% end -%>
44
stub_status on;
5-
<% if @location_cfg_append -%><% location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
5+
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
66
<%= key %> <%= value %>;<% end -%><% end -%>
77
}

0 commit comments

Comments
 (0)