From feedc63c33fcd78307c77735153a6757729beedd Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 26 Nov 2014 12:20:47 -0800 Subject: [PATCH] Fix the setting of the chain file in drupal vhost We were testing if the chain file contents var was not equal to empty string ('') before setting the chain file path in the vhost. Unfortunately this variable was unset so has a value of nil in the erb file. This meant that the condition matched even though we didn't want it to and we got a broken vhost file. Fix this by explicitly setting this var's value to undef by default in puppet. This results in a nil value erb side which we can test against more simply. Change-Id: I8016b7ab20843a6e35002bed1a79867480ddbd08 --- modules/drupal/manifests/init.pp | 1 + modules/drupal/templates/drupal.vhost.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/drupal/manifests/init.pp b/modules/drupal/manifests/init.pp index 3ab1116be3..bd8e1335b1 100644 --- a/modules/drupal/manifests/init.pp +++ b/modules/drupal/manifests/init.pp @@ -78,6 +78,7 @@ class drupal ( $site_ssl_enabled = false, $site_ssl_cert_file_contents = undef, $site_ssl_key_file_contents = undef, + $site_ssl_chain_file_contents = undef, $site_ssl_cert_file = '', $site_ssl_key_file = '', $site_ssl_chain_file = '', diff --git a/modules/drupal/templates/drupal.vhost.erb b/modules/drupal/templates/drupal.vhost.erb index 754491a574..487012f1d6 100644 --- a/modules/drupal/templates/drupal.vhost.erb +++ b/modules/drupal/templates/drupal.vhost.erb @@ -16,7 +16,7 @@ NameVirtualHost <%= @vhost_name %>:443 SSLProtocol All -SSLv2 -SSLv3 SSLCertificateFile <%= @site_ssl_cert_file %> SSLCertificateKeyFile <%= @site_ssl_key_file %> -<% if @site_ssl_chain_file_contents != '' %> +<% if @site_ssl_chain_file_contents %> SSLCertificateChainFile <%= @site_ssl_chain_file %> <% end %> <% end %>