Browse Source

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
changes/92/602092/1
Colleen Murphy 8 months ago
parent
commit
4ef66c2bee
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      templates/storyboard_http.vhost.erb
  2. 1
    1
      templates/storyboard_https.vhost.erb

+ 1
- 1
templates/storyboard_http.vhost.erb View File

@@ -1,5 +1,5 @@
1 1
 <VirtualHost *:80>
2
-<% if scope.lookupvar("storyboard::application::server_admin") != :undef %>
2
+<% if ! [nil, :undef].include?(scope.lookupvar("storyboard::application::server_admin")) %>
3 3
   ServerAdmin <%= scope.lookupvar("storyboard::application::server_admin") %>
4 4
 <% end %>
5 5
   ServerName <%= scope.lookupvar("storyboard::application::hostname") %>

+ 1
- 1
templates/storyboard_https.vhost.erb View File

@@ -1,5 +1,5 @@
1 1
 <VirtualHost *:80>
2
-<% if scope.lookupvar("storyboard::application::server_admin") != :undef %>
2
+<% if ! [nil, :undef].include?(scope.lookupvar("storyboard::application::server_admin")) %>
3 3
     ServerAdmin <%= scope.lookupvar("storyboard::application::server_admin") %>
4 4
 <% end %>
5 5
     ServerName <%= scope.lookupvar("storyboard::application::hostname") %>

Loading…
Cancel
Save