adds acl rule for testing

This commit is contained in:
Arne Teuke
2018-12-30 14:56:57 +01:00
parent e91d4d6808
commit 3d1c714cf5
3 changed files with 13 additions and 3 deletions

View File

@@ -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,
}
}