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
This commit is contained in:
Clark Boylan 2014-11-26 12:20:47 -08:00
parent a576be4197
commit 2b6f5cf2f6
2 changed files with 2 additions and 1 deletions

View File

@ -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 = '',

View File

@ -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 %>