aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-22 12:22:40 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-22 12:22:40 -0200
commit018f03e5fdcfe433acb34a143599fca3dfbffc33 (patch)
treed41ca2b9dd42dea915a8329b52842344d8a9fef0 /templates
parent6c081113990344c14c96586024258ebc7dfa6de8 (diff)
downloadpuppet-backupninja-018f03e5fdcfe433acb34a143599fca3dfbffc33.tar.gz
puppet-backupninja-018f03e5fdcfe433acb34a143599fca3dfbffc33.tar.bz2
Fixing handling for include and exclude parameters as arrays at rsync template
Diffstat (limited to 'templates')
-rw-r--r--templates/rsync.conf.erb10
1 files changed, 7 insertions, 3 deletions
diff --git a/templates/rsync.conf.erb b/templates/rsync.conf.erb
index 71bf0b6..163ffc3 100644
--- a/templates/rsync.conf.erb
+++ b/templates/rsync.conf.erb
@@ -12,9 +12,13 @@
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 -%>