add reqadd option

This commit is contained in:
Arne Teuke
2025-02-07 16:35:00 +01:00
parent 870288c6d5
commit 59e3ba0cc0
2 changed files with 13 additions and 13 deletions

View File

@@ -41,7 +41,7 @@ define cd_haproxy::server::proxy (
$default_backend = '', $default_backend = '',
$be_option = '', $be_option = '',
$fe_tcp_request = '', $fe_tcp_request = '',
$fe_req_add = '', $fe_http_request = '',
) { ) {
@@ -53,15 +53,15 @@ define cd_haproxy::server::proxy (
# Ensure acl_rule_front and acl_rule_back are arrays # Ensure acl_rule_front and acl_rule_back are arrays
$acl_rule_front_array = split($acl_rule_front, ';') $acl_rule_front_array = split($acl_rule_front, ';')
$acl_rule_back_array = split($acl_rule_back, ';') $acl_rule_back_array = split($acl_rule_back, ';')
$fe_use_backend_array = split($fe_use_backend,';') $fe_use_backend_array = split($fe_use_backend,';')
$backend_name_array = split($backend_name, ';') $backend_name_array = split($backend_name, ';')
$be_server_name_array = split($be_server_name, ';') $be_server_name_array = split($be_server_name, ';')
$be_option_array = split($be_option, ';') $be_option_array = split($be_option, ';')
$fe_tcp_request_array = split($fe_tcp_request, ';') $fe_tcp_request_array = split($fe_tcp_request, ';')
$fe_option_array = split($fe_option, ';') $fe_option_array = split($fe_option, ';')
$fe_req_add_array = split($fe_req_add, ';') $fe_http_request_array = split($fe_http_request, ';')
# create frontend section # create frontend section
concat::fragment { "frontend_${name}": concat::fragment { "frontend_${name}":

View File

@@ -16,9 +16,9 @@ maxconn <%= @fe_maxconn %>
option <%= fe_option %> option <%= fe_option %>
<% end -%> <% end -%>
<% end -%> <% end -%>
<% if @fe_req_add_array and !@fe_req_add_array.empty? -%> <% if @fe_http_request_array and !@fe_http_request_array.empty? -%>
<% @fe_req_add_array.each do |fe_req_add| -%> <% @fe_http_request_array.each do |fe_http_request| -%>
reqadd <%= fe_req_add %> http-request <%= fe_http_request %>
<% end -%> <% end -%>
<% end -%> <% end -%>