]> gitweb.fluxo.info Git - puppet-backupninja.git/commitdiff
Fix variable deprecations on templates
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 20 Oct 2015 16:14:08 +0000 (14:14 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 20 Oct 2015 16:14:08 +0000 (14:14 -0200)
13 files changed:
templates/backupninja.conf.erb
templates/backupninja.cron.erb
templates/dup.conf.erb
templates/labelmount.conf.erb
templates/maildir.conf.erb
templates/mysql.conf.erb
templates/pgsql.conf.erb
templates/rdiff.conf.erb
templates/rsync.conf.erb
templates/sh.conf.erb
templates/svn.conf.erb
templates/sys.conf.erb
templates/umount.conf.erb

index fe7affa3db2ff164490c823251b0dad855a951dd..20cc9b3f67af35b119f0200ce1321906cc18315f 100644 (file)
@@ -3,11 +3,11 @@
 # 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 -%>
@@ -17,9 +17,9 @@ reportwarning = <%= reportwarning ? 'yes' : 'no' %>
 <% 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' %>
index ec392ca9b11140e8962a81504ac694d4a9ea0207..3355d82efccaf3624a3a53a10e0d5ac0617c5ca1 100644 (file)
@@ -3,4 +3,4 @@
 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
index 4f15e789cd35e3d397e0e28d31f0fbd01aaa0406..533bb7482c4cbbca7adbee98dfc214a304ac02d1 100644 (file)
@@ -3,44 +3,44 @@
 # 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 %>
index e40c49d3bdf1e2b947b4d4e4f71456291b6627d8..b205bb393466e8f2287c5913c05228fcaa74e6c6 100644 (file)
@@ -1,2 +1,2 @@
-label = <%= label %>
-dest = <%= dest %>
+label = <%= @label %>
+dest = <%= @dest %>
index 351f3824f915da284b3dca7ed5b8e822abe7efbe..7f454a364ef878134453150f4a19c58fe5084b6a 100644 (file)
@@ -3,12 +3,12 @@
 # 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' %>
 
index b7ac5e8f0953f04d85371759e334168f43f6c206..cb4617d9f11502a15d449e9cfcb6f0b0172332eb 100644 (file)
@@ -3,23 +3,23 @@
 # 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 -%>
 
index 5ffa89c00b016eb73e3b4a6bf990717a1311dc25..e75f7d657e64c5213a58951654854ee923c3b3c2 100644 (file)
@@ -1,13 +1,13 @@
-<% 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' %>
 
index 23c336fc1dccde9af390e369848d6f82b17f2a5c..ca812ba55b99ff1b8935b5a3a62e7ad2e59ad2b1 100644 (file)
@@ -3,34 +3,34 @@
 # 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 %>
 <%-
index 778676fcd9a1fb33e49127e9b2918b65aaab2eb5..5ed4acb35a57fe2da56453119ecbc595b46db77b 100644 (file)
@@ -4,7 +4,7 @@
 # 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 %>
@@ -25,7 +25,7 @@ from = <%= from %>
 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 %>
 <%-
@@ -33,7 +33,7 @@ end -%>
 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 %>
 <%-
@@ -41,7 +41,7 @@ end -%>
 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 %>
 <%-
index f1e77ff42cbd579c351eb980058b62fe77b958c8..e0e513796842d40fbcd5e9f802a7ac5fa6a189b8 100644 (file)
@@ -5,6 +5,6 @@
 # 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 -%>
index 465cc673b33499336fca5ef6c8f4621125dee762..19417af783a8fda752c7cf53f28e13e325bc2bca 100644 (file)
@@ -3,8 +3,8 @@
 # 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 -%>
index a684e8b7f675dbfe8c04f6d612b1619530cbce92..84297d31412a535e4db2795a98ef2df520bbe76f 100644 (file)
@@ -3,16 +3,16 @@
 # 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' %>
index 59bfaec82344ed0903c90b541398baff67353283..1e59c3636e7520dca9b66ef4f265384c2f73093a 100644 (file)
@@ -1 +1 @@
-dir = <%= dest %>
+dir = <%= @dest %>