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
This commit is contained in:
Colleen Murphy 2018-09-12 18:40:50 +02:00
parent c4c7e17f19
commit 4ef66c2bee
2 changed files with 2 additions and 2 deletions

View File

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

View File

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