loadbalancer: add horizon ssl support

Add a new param (false by default) to activate SSL on Horizon HAproxy
pool.

feature #337
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi 2014-03-05 14:40:24 +01:00
parent 1bc4088490
commit b629cc102f
2 changed files with 14 additions and 4 deletions

View File

@ -31,6 +31,7 @@ class cloud::loadbalancer(
$keystone_api_admin = true,
$keystone_api = true,
$horizon = true,
$horizon_ssl = false,
$spice = true,
$haproxy_auth = $os_params::haproxy_auth,
$keepalived_state = 'BACKUP',
@ -199,10 +200,18 @@ class cloud::loadbalancer(
}
}
if $horizon {
cloud::loadbalancer::listen_http{
'horizon_cluster':
ports => $horizon_port,
listen_ip => $vip_public_ip;
if $horizon_ssl {
cloud::loadbalancer::listen_https{
'horizon_cluster':
ports => $horizon_port,
listen_ip => $vip_public_ip;
}
} else {
cloud::loadbalancer::listen_http{
'horizon_cluster':
ports => $horizon_port,
listen_ip => $vip_public_ip;
}
}
}

View File

@ -37,6 +37,7 @@ describe 'cloud::loadbalancer' do
:keystone_api_admin => true,
:keystone_api => true,
:horizon => true,
:horizon_ssl => false,
:spice => true,
:haproxy_auth => 'root:secrete',
:keepalived_state => 'BACKUP',