adds acl rule for testing
This commit is contained in:
@@ -27,14 +27,17 @@ define cd_haproxy::server::proxy (
|
||||
|
||||
$frontend_name = undef,
|
||||
$frontend_order = '010',
|
||||
$acl_rule = undef,
|
||||
$acl_order = '20',
|
||||
$backend_name = undef,
|
||||
$backend_order = '020',
|
||||
$backend_order = '030',
|
||||
|
||||
) {
|
||||
|
||||
$hy_main_config = '/etc/haproxy/haproxy.cfg'
|
||||
$hy_frontendrule = 'cd_haproxy/haproxy_frontend_rule.erb'
|
||||
$hy_backendrule = 'cd_haproxy/haproxy_backend_rule.erb'
|
||||
$hy_acl_rule = 'cd_haproxy/haproxy_acl_rule.erb'
|
||||
|
||||
# create frontend section
|
||||
concat::fragment { "frontend_${name}":
|
||||
@@ -43,11 +46,16 @@ $hy_backendrule = 'cd_haproxy/haproxy_backend_rule.erb'
|
||||
order => $frontend_order,
|
||||
}
|
||||
|
||||
# create acl section
|
||||
concat::fragment { "acl_${name}":
|
||||
target => $hy_main_config,
|
||||
content => template($hy_acl_rule),
|
||||
}
|
||||
|
||||
# create backend section
|
||||
concat::fragment { "backend_${name}":
|
||||
target => $hy_main_config,
|
||||
content => template($hy_backendrule),
|
||||
order => $backend_order,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user