Commit fdcb6134 authored by chris's avatar chris

templates: correctly prepend variables

parent 1778b850
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
# service in Puppet. # service in Puppet.
loglevel = <%= @loglvl %> loglevel = <%= @loglvl %>
when = <%= send(:when) %> when = <%= @send %>
reportemail = <%= @reportemail %> reportemail = <%= @reportemail %>
reportsuccess = <%= @reportsuccess ? 'yes' : 'no' %> reportsuccess = <%= @reportsuccess ? 'yes' : 'no' %>
reportwarning = <%= @reportwarning ? 'yes' : 'no' %> reportwarning = <%= @reportwarning ? 'yes' : 'no' %>
<% if reporthost.is_a? String -%> <% if @reporthost.is_a? String -%>
<%= 'reporthost = ' + @reporthost %> <%= 'reporthost = ' + @reporthost %>
<% end -%> <% end -%>
<% if reportuser.is_a? String -%> <% if @reportuser.is_a? String -%>
<%= 'reportuser = ' + @reportuser %> <%= 'reportuser = ' + @reportuser %>
<% end -%> <% end -%>
<% if reportdirectory.is_a? String -%> <% if @reportdirectory.is_a? String -%>
<%= 'reportdirectory = ' + @reportdirectory %> <%= 'reportdirectory = ' + @reportdirectory %>
<% end -%> <% end -%>
logfile = <%= @logfile %> logfile = <%= @logfile %>
......
...@@ -3,30 +3,30 @@ ...@@ -3,30 +3,30 @@
# the next time Puppet runs. Please make configuration changes to this # the next time Puppet runs. Please make configuration changes to this
# service in Puppet. # service in Puppet.
<%= 'options = ' + options if options %> <%= 'options = ' + @options if @options %>
<%= extras if extras %> <%= @extras if @extras %>
[source] [source]
type = local type = local
<%= 'keep = ' + keep if keep %> <%= 'keep = ' + @keep if @keep %>
<% if include.is_a? String -%> <% if @include.is_a? String -%>
<%= 'include = ' + include %> <%= 'include = ' + @include %>
<% elsif include.is_a? Array -%> <% elsif @include.is_a? Array -%>
<%= include.map { |i| "include = #{i}" }.join("\n") %> <%= @include.map { |i| "include = #{i}" }.join("\n") %>
<% end -%> <% end -%>
<% if exclude.is_a? String -%> <% if @exclude.is_a? String -%>
<%= 'exclude = ' + exclude %> <%= 'exclude = ' + @exclude %>
<% elsif exclude.is_a? Array -%> <% elsif @exclude.is_a? Array -%>
<%= exclude.map { |i| "exclude = #{i}" }.join("\n") %> <%= @exclude.map { |i| "exclude = #{i}" }.join("\n") %>
<% end -%> <% end -%>
<% if vsinclude.is_a? String -%> <% if @vsinclude.is_a? String -%>
<%= 'vsinclude = ' + vsinclude %> <%= 'vsinclude = ' + @vsinclude %>
<% elsif vsinclude.is_a? Array -%> <% elsif @vsinclude.is_a? Array -%>
<%= vsinclude.map { |i| "vsinclude = #{i}" }.join("\n") %> <%= @vsinclude.map { |i| "vsinclude = #{i}" }.join("\n") %>
<% end -%> <% end -%>
[dest] [dest]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment