# the next time Puppet runs. Please make configuration changes to this
# service in Puppet.
-loglevel = <%= loglvl %>
-when = <%= send(:when) %>
-reportemail = <%= reportemail %>
-reportsuccess = <%= reportsuccess ? 'yes' : 'no' %>
-reportwarning = <%= reportwarning ? 'yes' : 'no' %>
+loglevel = <%= @loglvl %>
+when = <%= send(:@when) %>
+reportemail = <%= @reportemail %>
+reportsuccess = <%= @reportsuccess ? 'yes' : 'no' %>
+reportwarning = <%= @reportwarning ? 'yes' : 'no' %>
<% if @reporthost -%>
<%= 'reporthost = ' + @reporthost %>
<% end -%>
<% if @reportdirectory -%>
<%= 'reportdirectory = ' + @reportdirectory %>
<% end -%>
-logfile = <%= logfile %>
-configdirectory = <%= configdir %>
-scriptdirectory = <%= scriptdir %>
-libdirectory = <%= libdir %>
-usecolors = <%= usecolors ? 'yes' : 'no' %>
-vservers = <%= vservers ? 'yes' : 'no' %>
+logfile = <%= @logfile %>
+configdirectory = <%= @configdir %>
+scriptdirectory = <%= @scriptdir %>
+libdirectory = <%= @libdir %>
+usecolors = <%= @usecolors ? 'yes' : 'no' %>
+vservers = <%= @vservers ? 'yes' : 'no' %>
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# # run backupninja
-<%= min %> <%= hour %> <%= dom %> <%= month %> <%= dow %> root if [ -x <%= backupninja_test_cmd %> ]; then <%= backupninja_cmd %>; fi
+<%= @min %> <%= @hour %> <%= @dom %> <%= @month %> <%= @dow %> root if [ -x <%= @backupninja_test_cmd %> ]; then <%= @backupninja_cmd %>; fi
# the next time Puppet runs. Please make configuration changes to this
# service in Puppet.
-<%= 'options = ' + options if options %>
-<%= 'nicelevel = ' + nicelevel if nicelevel %>
-<%= 'testconnect = ' + testconnect if testconnect %>
-<%= 'tmpdir = ' + tmpdir if tmpdir %>
+<%= 'options = ' + @options if @options %>
+<%= 'nicelevel = ' + @nicelevel if @nicelevel %>
+<%= 'testconnect = ' + @testconnect if @testconnect %>
+<%= 'tmpdir = ' + @tmpdir if @tmpdir %>
[gpg]
-<%= 'sign = ' + sign if sign %>
-<%= 'encryptkey = ' + encryptkey if encryptkey %>
-<%= 'signkey = ' + signkey if signkey %>
-<%= 'password = ' + password if password %>
+<%= 'sign = ' + @sign if @sign %>
+<%= 'encryptkey = ' + @encryptkey if @encryptkey %>
+<%= 'signkey = ' + @signkey if @signkey %>
+<%= 'password = ' + @password if @password %>
[source]
-<% 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]
-<%= 'incremental = ' + incremental if incremental %>
-<%= 'increments = ' + increments if increments %>
-<%= 'keep = ' + keep if keep %>
-<%= 'keepincroffulls = ' + keepincroffulls if keepincroffulls %>
-<%= 'bandwidthlimit = ' + bandwidthlimit if bandwidthlimit %>
-<%= 'sshoptions = ' + sshoptions if sshoptions %>
-<%= 'destdir = ' + destdir if destdir %>
-<%= 'desthost = ' + desthost if desthost %>
-<%= 'destuser = ' + destuser if destuser %>
-<%= 'desturl = ' + desturl if desturl %>
+<%= 'incremental = ' + @incremental if @incremental %>
+<%= 'increments = ' + @increments if @increments %>
+<%= 'keep = ' + @keep if @keep %>
+<%= 'keepincroffulls = ' + @keepincroffulls if @keepincroffulls %>
+<%= 'bandwidthlimit = ' + @bandwidthlimit if @bandwidthlimit %>
+<%= 'sshoptions = ' + @sshoptions if @sshoptions %>
+<%= 'destdir = ' + @destdir if @destdir %>
+<%= 'desthost = ' + @desthost if @desthost %>
+<%= 'destuser = ' + @destuser if @destuser %>
+<%= 'desturl = ' + @desturl if @desturl %>
-label = <%= label %>
-dest = <%= dest %>
+label = <%= @label %>
+dest = <%= @dest %>
# the next time Puppet runs. Please make configuration changes to this
# service in Puppet.
-<% %w{when srcdir destdir desthost destuser destid_file keepdaily keepweekly keepmonthly}.each do |v|
+<% %w{@when @srcdir @destdir @desthost @destuser @destid_file @keepdaily @keepweekly @keepmonthly}.each do |v|
if send(v)
-%><%= v + ' = ' + send(v) + "\n" %><%
end
end -%>
-remove = <%= remove ? 'yes' : 'no' %>
-multiconnection = <%= multiconnection ? 'yes' : 'no' %>
+remove = <%= @remove ? 'yes' : 'no' %>
+multiconnection = <%= @multiconnection ? 'yes' : 'no' %>
# the next time Puppet runs. Please make configuration changes to this
# service in Puppet.
-<% %w{user dbusername dbpassword dbhost databases backupdir vsname sqldumpoptions}.each do |v|
+<% %w{@user @dbusername @dbpassword @dbhost @databases @backupdir @vsname @sqldumpoptions}.each do |v|
if send(v)
-%><%= v + ' = ' + send(v) + "\n" %><%
end
end -%>
-hotcopy = <%= hotcopy ? 'yes' : 'no' %>
-sqldump = <%= sqldump ? 'yes' : 'no' %>
-compress = <%= compress ? 'yes' : 'no' %>
+hotcopy = <%= @hotcopy ? 'yes' : 'no' %>
+sqldump = <%= @sqldump ? 'yes' : 'no' %>
+compress = <%= @compress ? 'yes' : 'no' %>
-<% if real_configfile %>
-configfile = <%= real_configfile %>
+<% if @real_configfile %>
+configfile = <%= @real_configfile %>
<% end %>
-<% if nodata.is_a? String -%>
-<%= 'nodata = ' + nodata %>
-<% elsif nodata.is_a? Array -%>
-<%= "nodata = " + nodata.map { |i| "#{i}" }.join(" ") %>
+<% if @nodata.is_a? String -%>
+<%= 'nodata = ' + @nodata %>
+<% elsif @nodata.is_a? Array -%>
+<%= "nodata = " + @nodata.map { |i| "#{i}" }.join(" ") %>
<% end -%>
-<% if vsname %>
-vsname = <%= vsname %>
+<% if @vsname %>
+vsname = <%= @vsname %>
<% end %>
-<% if backupdir %>
-backupdir = <%= backupdir %>
+<% if @backupdir %>
+backupdir = <%= @backupdir %>
<% end %>
-<% if databases.is_a? String -%>
-<%= 'databases = ' + databases %>
-<% elsif databases.is_a? Array -%>
-<%= "databases = " + databases.map { |i| "#{i}" }.join(" ") %>
+<% if @databases.is_a? String -%>
+<%= 'databases = ' + @databases %>
+<% elsif @databases.is_a? Array -%>
+<%= "databases = " + @databases.map { |i| "#{i}" }.join(" ") %>
<% end -%>
-compress = <%= compress ? 'yes' : 'no' %>
+compress = <%= @compress ? 'yes' : 'no' %>
# 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]
-<%- %w{type host directory user sshoptions}.each do |v|
+<%- %w{@type @host @directory @user @sshoptions}.each do |v|
if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
<%-
# service in Puppet.
[general]
-<%- %w{log partition fscheck read_only mountpoint backupdir format days keepdaily keepweekly keepmonthly lockfile nicelevel enable_mv_timestamp_bug, tmp, multiconnection}.each do |v|
+<%- %w{@log @partition @fscheck @read_only @mountpoint @backupdir @format @days @keepdaily @keepweekly @keepmonthly @lockfile @nicelevel @enable_mv_timestamp_bug, @tmp, @multiconnection}.each do |v|
if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
<%-
end -%>
[source]
-<% unless from.empty? and from.to_s != "false" -%>
-from = <%= from %>
+<% unless @from.empty? and @from.to_s != "false" -%>
+from = <%= f@rom %>
<% end -%>
-<%- %w{include exclude}.each do |v|
+<%- %w{@include exclude}.each do |v|
if has_variable?(v)
instance_variable_get("@#{v}").to_a.each do |parameter| -%>
<%= v + ' = ' + parameter %>
end -%>
[dest]
-<%- %w{dest testconnect ssh protocol numericids compress host port user id_file bandwidthlimit remote_rsync batch batchbase fakesuper}.each do |v|
+<%- %w{@dest @testconnect @ssh @protocol @numericids @compress @host @port @user @id_file @bandwidthlimit @remote_rsync @batch @batchbase @fakesuper}.each do |v|
if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
<%-
end -%>
[services]
-<%- %w{initscripts service}.each do |v|
+<%- %w{@initscripts service}.each do |v|
if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
<%-
end -%>
[system]
-<%- %w{rm cp touch mv fsck}.each do |v|
+<%- %w{@rm @cp @touch @mv @fsck}.each do |v|
if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
<%-
# the next time Puppet runs. Please make configuration changes to this
# service in Puppet.
-<% command_string.each do |line| -%>
+<% @command_string.each do |line| -%>
<%= line %>
<% end -%>
# the next time Puppet runs. Please make configuration changes to this
# service in Puppet.
-<% %w{src dest tmp vsname}.each do |v|
+<% %w{@src @dest @tmp @vsname}.each do |v|
if send(v)
-%><%= v + ' = ' + send(v) + "\n" %><%
end
-end -%>
\ No newline at end of file
+end -%>
# the next time Puppet runs. Please make configuration changes to this
# service in Puppet.
-<% %w{parentdir packagesfile partitionsfile hardwarefile}.each do |v|
+<% %w{@parentdir @packagesfile @partitionsfile @hardwarefile}.each do |v|
if send(v)
-%><%= v + ' = ' + send(v) + "\n" %><%
end
end -%>
-packages = <%= packages ? 'yes' : 'no' %>
-partitions = <%= partitions ? 'yes' : 'no' %>
-dosfdisk = <%= dosfdisk ? 'yes' : 'no' %>
-hardware = <%= hardware ? 'yes' : 'no' %>
-dohwinfo = <%= dohwinfo ? 'yes' : 'no' %>
-luksheaders = <%= doluks ? 'yes' : 'no' %>
-lvm = <%= dolvm ? 'yes' : 'no' %>
+packages = <%= @packages ? 'yes' : 'no' %>
+partitions = <%= @partitions ? 'yes' : 'no' %>
+dosfdisk = <%= @dosfdisk ? 'yes' : 'no' %>
+hardware = <%= @hardware ? 'yes' : 'no' %>
+dohwinfo = <%= @dohwinfo ? 'yes' : 'no' %>
+luksheaders = <%= @doluks ? 'yes' : 'no' %>
+lvm = <%= @dolvm ? 'yes' : 'no' %>
-dir = <%= dest %>
+dir = <%= @dest %>