add tcp_option
This commit is contained in:
@@ -1,23 +1,6 @@
|
||||
## cd_haproxy::server::proxy.pp
|
||||
# Module name: cd_haproxy
|
||||
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
|
||||
# # License:
|
||||
# This file is part of cd_haproxy.
|
||||
#
|
||||
# cd_haproxy is used for providing automatic configuration of HAProxy
|
||||
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# @summary Define manages the proxies for cd_haproxy.
|
||||
# @param [string] haproxy_fqdn the fqdn of the haproxy server in question.
|
||||
# @param [string] frontend_name the name for the frontend section rule.
|
||||
@@ -56,6 +39,7 @@ define cd_haproxy::server::proxy (
|
||||
$be_mode = '',
|
||||
$default_backend = '',
|
||||
$be_option = '',
|
||||
$fe_tcp_request = '',
|
||||
|
||||
) {
|
||||
|
||||
@@ -72,6 +56,7 @@ define cd_haproxy::server::proxy (
|
||||
$backend_name_array = split($backend_name, ';')
|
||||
$be_server_name_array = split($be_server_name, ';')
|
||||
$be_option_array = split($be_option, ';')
|
||||
$fe_tcp_request_array = split($fe_tcp_request, ';')
|
||||
|
||||
# create frontend section
|
||||
concat::fragment { "frontend_${name}":
|
||||
|
||||
@@ -6,6 +6,12 @@ bind <%= @fe_bind_mode %>
|
||||
<% if @fe_maxconn != '' -%>
|
||||
maxconn <%= @fe_maxconn %>
|
||||
<% end -%>
|
||||
|
||||
<% if @fe_tcp_request_array and !@fe_tcp_request_array.empty? -%>
|
||||
<% @fe_tcp_request_array.each do |fe_tcp_request| -%>
|
||||
acl <%= fe_tcp_request %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% if @acl_rule_front_array and !@acl_rule_front_array.empty? -%>
|
||||
<% @acl_rule_front_array.each do |acl_rule_front| -%>
|
||||
acl <%= acl_rule_front %>
|
||||
|
||||
Reference in New Issue
Block a user