]> gitweb.fluxo.info Git - puppet-backupninja.git/commitdiff
Fixing handling for include and exclude parameters as arrays at rsync template
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 22 Jan 2013 14:22:40 +0000 (12:22 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 22 Jan 2013 14:22:40 +0000 (12:22 -0200)
templates/rsync.conf.erb

index 71bf0b66cdb52fe9629971217965b24c7580e4c5..163ffc34c1752a5981c760dff5106ad772fbcc12 100644 (file)
 end -%>
 
 [source]
-<%- %w{from include exclude}.each do |v|
-    if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
-<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
+<% unless from.empty? and from.to_s != "false" -%>
+from = <%= from %>
+<% end -%>
+<%- %w{include exclude}.each do |v|
+    if has_variable?(v)
+      instance_variable_get("@#{v}").to_a.each do |parameter| -%>
+<%= v + ' = ' + parameter %>
 <%-
     end
 end -%>