From fd97e061aeca2db16a8dde9b1fb440a81a8c8a98 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 6 Jun 2019 16:28:37 -0700 Subject: [PATCH] Evaluate files vhosts after we determine ssl file paths Previously we evaluated the vhost templates before setting ssl_cert_file_ and ssl_key_file_ and ssl_chain_file_. This made erb unhappy because those are the three variables we use to set paths in the vhost. Fix this by moving the vhost after the ssl file vars are set. Change-Id: I4ba62521c9e7da104f8799d016cbcf0214cbdfc1 --- modules/openstack_project/manifests/website.pp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openstack_project/manifests/website.pp b/modules/openstack_project/manifests/website.pp index 12a0b16f3f..252692a0dc 100644 --- a/modules/openstack_project/manifests/website.pp +++ b/modules/openstack_project/manifests/website.pp @@ -39,14 +39,6 @@ define openstack_project::website ( $docroot_ = $docroot } - ::httpd::vhost { $name: - serveraliases => $aliases, - port => 443, # Is required despite not being used. - docroot => $docroot_, - priority => '50', - content => template($template) - } - if ($ssl_cert != undef) { $ssl_cert_file_ = "/etc/ssl/certs/${name}.pem" file { "${ssl_cert_file_}": @@ -88,4 +80,12 @@ define openstack_project::website ( } else { $ssl_chain_file_ = $ssl_chain_file } + + ::httpd::vhost { $name: + serveraliases => $aliases, + port => 443, # Is required despite not being used. + docroot => $docroot_, + priority => '50', + content => template($template) + } }