adding backend template for testing

This commit is contained in:
Arne Teuke
2018-12-29 19:54:41 +01:00
parent 66f16e8e09
commit e91d4d6808
3 changed files with 14 additions and 1 deletions

View File

@@ -27,11 +27,14 @@ define cd_haproxy::server::proxy (
$frontend_name = undef,
$frontend_order = '010',
$backend_name = undef,
$backend_order = '020',
) {
$hy_main_config = '/etc/haproxy/haproxy.cfg'
$hy_frontendrule = 'cd_haproxy/haproxy_frontend_rule.erb'
$hy_backendrule = 'cd_haproxy/haproxy_backend_rule.erb'
# create frontend section
concat::fragment { "frontend_${name}":
@@ -40,4 +43,11 @@ $hy_frontendrule = 'cd_haproxy/haproxy_frontend_rule.erb'
order => $frontend_order,
}
# create backend section
concat::fragment { "backend_${name}":
target => $hy_main_config,
content => template($hy_backendrule),
order => $backend_order,
}
}