Commit fdcb6134 authored by chris's avatar chris

templates: correctly prepend variables

parent 1778b850
......@@ -4,17 +4,17 @@
# service in Puppet.
loglevel = <%= @loglvl %>
when = <%= send(:when) %>
when = <%= @send %>
reportemail = <%= @reportemail %>
reportsuccess = <%= @reportsuccess ? 'yes' : 'no' %>
reportwarning = <%= @reportwarning ? 'yes' : 'no' %>
<% if reporthost.is_a? String -%>
<% if @reporthost.is_a? String -%>
<%= 'reporthost = ' + @reporthost %>
<% end -%>
<% if reportuser.is_a? String -%>
<% if @reportuser.is_a? String -%>
<%= 'reportuser = ' + @reportuser %>
<% end -%>
<% if reportdirectory.is_a? String -%>
<% if @reportdirectory.is_a? String -%>
<%= 'reportdirectory = ' + @reportdirectory %>
<% end -%>
logfile = <%= @logfile %>
......
......@@ -3,30 +3,30 @@
# the next time Puppet runs. Please make configuration changes to this
# service in Puppet.
<%= 'options = ' + options if options %>
<%= 'options = ' + @options if @options %>
<%= extras if extras %>
<%= @extras if @extras %>
[source]
type = local
<%= 'keep = ' + keep if keep %>
<%= 'keep = ' + @keep if @keep %>
<% if include.is_a? String -%>
<%= 'include = ' + include %>
<% elsif include.is_a? Array -%>
<%= include.map { |i| "include = #{i}" }.join("\n") %>
<% if @include.is_a? String -%>
<%= 'include = ' + @include %>
<% elsif @include.is_a? Array -%>
<%= @include.map { |i| "include = #{i}" }.join("\n") %>
<% end -%>
<% if exclude.is_a? String -%>
<%= 'exclude = ' + exclude %>
<% elsif exclude.is_a? Array -%>
<%= exclude.map { |i| "exclude = #{i}" }.join("\n") %>
<% if @exclude.is_a? String -%>
<%= 'exclude = ' + @exclude %>
<% elsif @exclude.is_a? Array -%>
<%= @exclude.map { |i| "exclude = #{i}" }.join("\n") %>
<% end -%>
<% if vsinclude.is_a? String -%>
<%= 'vsinclude = ' + vsinclude %>
<% elsif vsinclude.is_a? Array -%>
<%= vsinclude.map { |i| "vsinclude = #{i}" }.join("\n") %>
<% if @vsinclude.is_a? String -%>
<%= 'vsinclude = ' + @vsinclude %>
<% elsif @vsinclude.is_a? Array -%>
<%= @vsinclude.map { |i| "vsinclude = #{i}" }.join("\n") %>
<% end -%>
[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