From 1c0565d2b73b7475d20fc37b445d1731990db154 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 11 Apr 2014 11:46:46 +0200 Subject: [PATCH] dashboard: improve Apache configuration - Disable default vhost in Apache2 - Enable Listen to fix binding on HTTP/HTTPS port Bug #404 --- manifests/dashboard.pp | 10 +++++++++- spec/classes/cloud_dashboard_spec.rb | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/manifests/dashboard.pp b/manifests/dashboard.pp index 20b225b8..4a0cd7b9 100644 --- a/manifests/dashboard.pp +++ b/manifests/dashboard.pp @@ -94,6 +94,14 @@ class cloud::dashboard( # We build the param needed for horizon class $keystone_url = "${keystone_proto}://${keystone_host}:${keystone_port}/v2.0" + # Apache2 specific configuration + $vhost_extra_params = { + 'add_listen' => true + } + ensure_resource('class', 'apache', { + default_vhost => false + }) + class { 'horizon': secret_key => $secret_key, can_set_mount_point => 'False', @@ -112,7 +120,7 @@ class cloud::dashboard( horizon_cert => $horizon_cert, horizon_key => $horizon_key, horizon_ca => $horizon_ca, - vhost_extra_params => { 'add_listen' => false } + vhost_extra_params => $vhost_extra_params } if ($::osfamily == 'Debian') { diff --git a/spec/classes/cloud_dashboard_spec.rb b/spec/classes/cloud_dashboard_spec.rb index f21d549e..54616317 100644 --- a/spec/classes/cloud_dashboard_spec.rb +++ b/spec/classes/cloud_dashboard_spec.rb @@ -48,8 +48,9 @@ describe 'cloud::dashboard' do :keystone_url => 'http://keystone.openstack.org:5000/v2.0', :django_debug => true, :neutron_options => { 'enable_lb' => true }, - :vhost_extra_params => { 'add_listen' => false } + :vhost_extra_params => { 'add_listen' => true } ) + should contain_class('apache').with(:default_vhost => false) end end