1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
<% if $_sort_options_alphabetic == true { -%>
<% $option_order = {} -%>
<% } else { -%>
<% $option_order = {
'acl' => -1,
'tcp-request' => 2,
'block' => 3,
'http-request' => 4,
'reqallow' => 5,
'reqdel' => 5,
'reqdeny' => 5,
'reqidel' => 5,
'reqideny' => 5,
'reqipass' => 5,
'reqirep' => 5,
'reqitarpit' => 5,
'reqpass' => 5,
'reqrep' => 5,
'reqtarpit' => 5,
'reqadd' => 6,
'redirect' => 7,
'use_backend' => 8,
'default_backend' => 9,
'use-server' => 9,
'option' => 10,
'http-check' => 11,
'server' => 100,
} -%>
<% } -%>
<% if String(type($options, 'generalized')).index('Array') == 0 { -%>
<% $options.each |$option| { -%>
<%= epp('haproxy/haproxy_options_sorting.epp', { 'options' => $option, 'option_order' => $option_order }) -%>
<% } -%>
<% } elsif String(type($options, 'generalized')).index('Hash') == 0 { -%>
<%= epp('haproxy/haproxy_options_sorting.epp', { 'options' => $options, 'option_order' => $option_order }) -%>
<% } -%>
|