summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColleen Murphy <colleen.murphy@suse.de>2018-07-12 14:34:40 +0200
committerColleen Murphy <colleen.murphy@suse.de>2018-07-12 14:34:59 +0200
commit74e6af7fd76ef3908c72d21c85783a3fc5be5906 (patch)
treee583ee02a5257f9047a73dac28396dcf08f6cfa1
parent4902600dd1fd03a6e70c26e7b5153fec8358c29d (diff)
Fix template variables
When serveraliases is not defined it should evaluate to nil, not ''. Check for both to cover our bases. Change-Id: Ie69baf01963f33cf695a0de763af75dc33b67daa
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: Mon, 23 Jul 2018 07:34:04 +0000 Reviewed-on: https://review.openstack.org/582169 Project: openstack-infra/puppet-kibana Branch: refs/heads/master
-rw-r--r--templates/dual-elasticsearch.vhost.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/dual-elasticsearch.vhost.erb b/templates/dual-elasticsearch.vhost.erb
index 3f4fc67..6f75740 100644
--- a/templates/dual-elasticsearch.vhost.erb
+++ b/templates/dual-elasticsearch.vhost.erb
@@ -3,7 +3,7 @@
3 ServerAdmin <%= @serveradmin %> 3 ServerAdmin <%= @serveradmin %>
4<% if @serveraliases.is_a? Array %> 4<% if @serveraliases.is_a? Array %>
5<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %> 5<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %>
6<% elsif @serveraliases != '' %> 6<% elsif ! ['', nil].include?(@serveraliases) %>
7<%= " ServerAlias #{@serveraliases}" %> 7<%= " ServerAlias #{@serveraliases}" %>
8<% end %> 8<% end %>
9 9