Browse Source

Use instance variables in puppet template

Using local ruby variables in puppet ERB templates was deprecated in
puppet 3 and doesn't work any more in puppet 4. Access these values as
ruby instance variables instead.

Change-Id: I06bdd6f5b1f13c4970c5e3e9dc8be4cf8d919b03
changes/09/564609/2
Colleen Murphy 1 year ago
parent
commit
efba033351
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      templates/dual-elasticsearch.vhost.erb

+ 4
- 4
templates/dual-elasticsearch.vhost.erb View File

@@ -2,9 +2,9 @@
2 2
   ServerName <%= @vhost_name %>
3 3
   ServerAdmin <%= @serveradmin %>
4 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 6
 <% elsif @serveraliases != '' %>
7
-<%= "  ServerAlias #{serveraliases}" %>
7
+<%= "  ServerAlias #{@serveraliases}" %>
8 8
 <% end %>
9 9
 
10 10
   ErrorLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-error.log
@@ -32,8 +32,8 @@
32 32
     ProxyPassReverse <%= @elasticsearch_prefix %> <%= @elasticsearch_url %>/
33 33
   </IfModule>
34 34
 
35
-  DocumentRoot <%= docroot %>
36
-  <Directory <%= docroot %>>
35
+  DocumentRoot <%= @docroot %>
36
+  <Directory <%= @docroot %>>
37 37
     Options -Multiviews
38 38
     <IfVersion >= 2.4>
39 39
     Require all granted

Loading…
Cancel
Save