Fix variables in nodepool.default.erb template
Since all the variables accessed in this template are within the current scope, there is no need to use scope.lookupvar here. Using it adds complications, especially when passing undefined values. This patch removes unnecessary uses of scope.lookupvar and replaces them with instance variables. This patch leaves the vhost template alone since the template is not evaluated in the same scope. The nodepool.logging.conf template was already properly using scoped instance variables. Change-Id: Ie7d0a45905103c81d0c1822d89e2731e7395a3e3
This commit is contained in:
parent
651f20d3a3
commit
9e37efea4c
|
@ -1,8 +1,8 @@
|
|||
<% if scope.lookupvar("nodepool::statsd_host") != "" -%>
|
||||
export STATSD_HOST=<%= scope.lookupvar("nodepool::statsd_host") %>
|
||||
<% if @statsd_host != "" -%>
|
||||
export STATSD_HOST=<%= @statsd_host %>
|
||||
export STATSD_PORT=8125
|
||||
<% end -%>
|
||||
<% scope.lookupvar("nodepool::environment").keys.sort.each do |key| -%>
|
||||
export <%= key %>='<%= scope.lookupvar("nodepool::environment")[key] %>'
|
||||
<% @environment.keys.sort.each do |key| -%>
|
||||
export <%= key %>='<%= @environment[key] %>'
|
||||
<% end -%>
|
||||
DAEMON_ARGS="-c /etc/nodepool/nodepool.yaml -l /etc/nodepool/logging.conf"
|
||||
|
|
Loading…
Reference in New Issue