From a791527485bb5d31727215a497ce8880527111e1 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Fri, 27 Apr 2018 20:28:48 +0200 Subject: [PATCH] Fix scope of vhost template variables Dynamic scoping for variables in ERB templates was removed in puppet 4[1] which means that the variables defined in the openstack_health::vhost class cannot be found when it is referenced in the httpd::vhost defined type and will be evaluated as nil when puppet runs. Use scope.lookupvar instead to be explicit about the variable's source. [1] https://puppet.com/docs/puppet/4.10/lang_updating_manifests.html#dynamic-scoping-in-erb Depends-On: https://review.openstack.org/527302 Change-Id: I19a55d079b236728f1311e130ec6ea851539b446 --- templates/openstack-health-frontend.vhost.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/openstack-health-frontend.vhost.erb b/templates/openstack-health-frontend.vhost.erb index 37fe134..76fa9ed 100644 --- a/templates/openstack-health-frontend.vhost.erb +++ b/templates/openstack-health-frontend.vhost.erb @@ -9,7 +9,7 @@ Listen <%= @vhost_port %> CustomLog ${APACHE_LOG_DIR}/openstack-health-frontend-access.log combined ErrorLog ${APACHE_LOG_DIR}/openstack-health-frontend-error.log - > + > Order allow,deny Allow from all = 2.4> @@ -17,6 +17,6 @@ Listen <%= @vhost_port %> - DocumentRoot <%= @frontend_dir %> + DocumentRoot <%= scope.lookupvar('::openstack_health::vhost::frontend_dir') %> DirectoryIndex index.html