Skip to content

Commit 62e9296

Browse files
authored
Merge pull request #569 from puppetlabs/CAT-1314-template_bug_with_maxconn_since_PR564_fix
(CAT-1314) Fix for template bug with maxconn since PR#564
2 parents 394fbb7 + 1a72dd3 commit 62e9296

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

templates/haproxy_options_sorting.epp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<% if String(type($options, 'generalized')).index('Hash') == 0 and $option_order.empty { -%>
22
<%- $sorted_options = sort($options.keys).map |$key| {[$key, $options[$key]] } -%>
33
<%- $sorted_options.each |$values| { -%>
4-
<%- if type($values[1], 'generalized') == String { -%>
5-
<%= $values[0] %> <%= $values[1] %>
6-
<%- } else { -%>
4+
<%- if String(type($values[1], 'generalized')).index('Array') == 0 { -%>
75
<%- $values[1].filter |$value| { $value != undef }.each |$val| { -%>
86
<%= $values[0] %> <%= $val %>
97
<%- } -%>
8+
<%- } else { -%>
9+
<%= $values[0] %> <%= $values[1] %>
1010
<%- } -%>
1111
<%- } -%>
1212
<% } elsif String(type($options, 'generalized')).index('Hash') == 0 and $option_order.empty == false { -%>
@@ -19,12 +19,12 @@
1919
}
2020
}.map |$key| {[$key, $options[$key]] } -%>
2121
<%- $sorted_options.each |$values| { -%>
22-
<%- if type($values[1], 'generalized') == String { -%>
23-
<%= $values[0] %> <%= $values[1] %>
24-
<%- } else { -%>
22+
<%- if String(type($values[1], 'generalized')).index('Array') == 0 { -%>
2523
<%- $values[1].filter |$value| { $value != undef }.each |$val| { -%>
2624
<%= $values[0] %> <%= $val %>
2725
<%- } -%>
26+
<%- } else { -%>
27+
<%= $values[0] %> <%= $values[1] %>
2828
<%- } -%>
2929
<%- } -%>
3030
<% } -%>

0 commit comments

Comments
 (0)