change template
This commit is contained in:
@@ -46,8 +46,8 @@ $frontend_mode = undef,
|
||||
$fe_use_backend = '',
|
||||
$fe_bind_mode = undef,
|
||||
$frontend_order = '010',
|
||||
$acl_rule = '',
|
||||
$acl_order = '020',
|
||||
$acl_rule_front = '',
|
||||
$acl_rule_back = '',
|
||||
$backend_name = undef,
|
||||
$backend_order = '030',
|
||||
$fe_maxconn = undef,
|
||||
@@ -68,13 +68,6 @@ $hy_acl_rule = 'cd_haproxy/haproxy_acl_rule.erb'
|
||||
order => $frontend_order,
|
||||
}
|
||||
|
||||
# create acl section
|
||||
concat::fragment { "acl_${name}":
|
||||
target => $hy_main_config,
|
||||
content => template($hy_acl_rule),
|
||||
order => $acl_order,
|
||||
}
|
||||
|
||||
# create backend section
|
||||
concat::fragment { "backend_${name}":
|
||||
target => $hy_main_config,
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<% if @fqdn == @haproxy_fqdn -%>
|
||||
backend <%= @backend_name %>
|
||||
<% if @acl_rule_back != '' -%>
|
||||
<% @acl_rule.each do |acl_rule| -%>
|
||||
acl <%= acl_rule %>
|
||||
<% end -%>
|
||||
<% @be_server_name.each do |be_server| -%>
|
||||
server <%= be_server %>
|
||||
<% end end -%>
|
||||
|
||||
@@ -7,6 +7,10 @@ maxconn <%= @fe_maxconn %>
|
||||
<% end -%>
|
||||
<% if @fe_maxconn == '' -%>
|
||||
<% end -%>
|
||||
<% if @acl_rule_front != '' -%>
|
||||
<% @acl_rule.each do |acl_rule| -%>
|
||||
acl <%= acl_rule %>
|
||||
<% end -%>
|
||||
<% if @fe_use_backend != '' -%>
|
||||
use_backend <%= @fe_use_backend %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user