From 77d0da8b8c19f13a27328dcd837d46c08d405ac5 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 5 May 2014 11:31:33 +0200 Subject: [PATCH] lb: fix lint --- manifests/loadbalancer.pp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp index f9ecb5db..3095e222 100644 --- a/manifests/loadbalancer.pp +++ b/manifests/loadbalancer.pp @@ -207,10 +207,17 @@ class cloud::loadbalancer( listen_ip => $vip_public_ip; } } else { - cloud::loadbalancer::listen_http{ - 'horizon_cluster': - ports => $horizon_port, - listen_ip => $vip_public_ip; + # Horizon URL is not the same on Red Hat and Debian/Ubuntu + if $::operatingsystem == 'RedHat' { + $horizon_auth_url = 'dashboard' + } else { + $horizon_auth_url = 'horizon' + } + cloud::loadbalancer::listen_http{ 'horizon_cluster': + ports => $horizon_port, + httpchk => "httpchk GET \"/${horizon_auth_url} HTTP/1.0\r\nUser-Agent: HAProxy-${::hostname}\"", + options => { 'cookie' => 'sessionid prefix', 'balance' => 'leastconn' }, + listen_ip => $vip_public_ip; } } }