summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColleen Murphy <colleen@gazlene.net>2018-09-12 18:40:50 +0200
committerColleen Murphy <colleen@gazlene.net>2018-09-12 18:40:50 +0200
commit4ef66c2bee40f00d475375cad6b9cb6003fc324a (patch)
treee7f3fc0562abdd0bfd38b1239c76ca162d39d965
parentc4c7e17f1933194784f7bbf3f07cc746e4b58d1d (diff)
Fix undef in vhost templates
On puppet 3 an explicit undef value is evaluated as the symbol :undef in ERB templates, while on puppet 4 the explicit undef is evaluated the same as the implicit undef which comes to the nil value in ERB. Check for both values to make both puppet versions happy. Change-Id: Ib4bff7259fea2722f799745d476d1af0c34408d5
Notes
Notes (review): Code-Review+2: Clark Boylan <cboylan@sapwetik.org> Code-Review+2: Monty Taylor <mordred@inaugust.com> Workflow+1: Monty Taylor <mordred@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 12 Sep 2018 19:30:18 +0000 Reviewed-on: https://review.openstack.org/602092 Project: openstack-infra/puppet-storyboard Branch: refs/heads/master
-rw-r--r--templates/storyboard_http.vhost.erb2
-rw-r--r--templates/storyboard_https.vhost.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/storyboard_http.vhost.erb b/templates/storyboard_http.vhost.erb
index 524adad..951bf83 100644
--- a/templates/storyboard_http.vhost.erb
+++ b/templates/storyboard_http.vhost.erb
@@ -1,5 +1,5 @@
1<VirtualHost *:80> 1<VirtualHost *:80>
2<% if scope.lookupvar("storyboard::application::server_admin") != :undef %> 2<% if ! [nil, :undef].include?(scope.lookupvar("storyboard::application::server_admin")) %>
3 ServerAdmin <%= scope.lookupvar("storyboard::application::server_admin") %> 3 ServerAdmin <%= scope.lookupvar("storyboard::application::server_admin") %>
4<% end %> 4<% end %>
5 ServerName <%= scope.lookupvar("storyboard::application::hostname") %> 5 ServerName <%= scope.lookupvar("storyboard::application::hostname") %>
diff --git a/templates/storyboard_https.vhost.erb b/templates/storyboard_https.vhost.erb
index 15ce048..2f05e08 100644
--- a/templates/storyboard_https.vhost.erb
+++ b/templates/storyboard_https.vhost.erb
@@ -1,5 +1,5 @@
1<VirtualHost *:80> 1<VirtualHost *:80>
2<% if scope.lookupvar("storyboard::application::server_admin") != :undef %> 2<% if ! [nil, :undef].include?(scope.lookupvar("storyboard::application::server_admin")) %>
3 ServerAdmin <%= scope.lookupvar("storyboard::application::server_admin") %> 3 ServerAdmin <%= scope.lookupvar("storyboard::application::server_admin") %>
4<% end %> 4<% end %>
5 ServerName <%= scope.lookupvar("storyboard::application::hostname") %> 5 ServerName <%= scope.lookupvar("storyboard::application::hostname") %>