Debian Codegraph @

templates/haproxy-base.cfg.epp

raw
1 global
2 <% sort($_global_options.convert_to(Array)).each |$values| { -%>
3 <%# Skip options whose value is undef or nil -%>
4 <%- if $values[1] != undef and $values[1] != nil { -%>
5 <%- if String(type($values[1], 'generalized')).index('Array') == 0 { -%>
6 <%- $values[1].each |$item| { -%>
7 <%= $values[0] %> <%= $item %>
8 <%- } -%>
9 <%- } else { -%>
10 <%= $values[0] %> <%= $values[1] %>
11 <%- } -%>
12 <%- } -%>
13 <% } -%>
14
15 defaults
16 <% sort($_defaults_options.convert_to(Array)).each |$values| { -%>
17 <%# Skip options whose value is undef or nil -%>
18 <%- if $values[1] != undef and $values[1] != nil { -%>
19 <%- if String(type($values[1], 'generalized')).index('Array') == 0 { -%>
20 <%- $values[1].each |$item| { -%>
21 <%= $values[0] %> <%= $item %>
22 <%- } -%>
23 <%- } else { -%>
24 <%= $values[0] %> <%= $values[1] %>
25 <%- } -%>
26 <%- } -%>
27 <% } -%>
28 <% if $custom_fragment { -%>
29
30 <%= $custom_fragment %>
31 <% } -%>