From d5f3dbe0a5ff87a619bec9a99c0618f90f781659 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 20 Oct 2015 14:14:08 -0200 Subject: Fix variable deprecations on templates --- templates/rsync.conf.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'templates/rsync.conf.erb') diff --git a/templates/rsync.conf.erb b/templates/rsync.conf.erb index 778676f..5ed4acb 100644 --- a/templates/rsync.conf.erb +++ b/templates/rsync.conf.erb @@ -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 %> <%- @@ -12,10 +12,10 @@ 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 %> <%- -- cgit v1.2.3