diff options
author | Micah Anderson <micah@riseup.net> | 2008-06-05 16:13:02 +0000 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2008-06-05 16:13:02 +0000 |
commit | ebcd9d1dfe6ab890cedd1409346f59ee19bb89e6 (patch) | |
tree | 35ee2377bf48481614399fa5985f44f744dedb27 | |
parent | ebec65f24c7dbf53dd294614255fbca1a3168b77 (diff) | |
download | puppet-backupninja-ebcd9d1dfe6ab890cedd1409346f59ee19bb89e6.tar.gz puppet-backupninja-ebcd9d1dfe6ab890cedd1409346f59ee19bb89e6.tar.bz2 |
Add vsinclude option to rdiff handler
-rw-r--r-- | manifests/rdiff.pp | 1 | ||||
-rw-r--r-- | templates/rdiff.conf.erb | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp index 0a84a6b..580af87 100644 --- a/manifests/rdiff.pp +++ b/manifests/rdiff.pp @@ -23,6 +23,7 @@ define backupninja::rdiff($order = 90, $type = 'local', $exclude = [ "/home/*/.gnupg", "/home/*/.local/share/Trash", "/home/*/.Trash", "/home/*/.thumbnails", "/home/*/.beagle", "/home/*/.aMule", "/home/*/gtk-gnutella-downloads" ], $include = [ "/var/spool/cron/crontabs", "/var/backups", "/etc", "/root", "/home", "/usr/local/*bin", "/var/lib/dpkg/status*" ], + $vsinclude = false, $keep = 30, $sshoptions = false, $options = false, diff --git a/templates/rdiff.conf.erb b/templates/rdiff.conf.erb index 2906dc4..f5548e4 100644 --- a/templates/rdiff.conf.erb +++ b/templates/rdiff.conf.erb @@ -21,6 +21,12 @@ type = local <%= 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") %> +<% end -%> + [dest] <% %w{type host directory user sshoptions}.each do |v| if @scope.lookupvar(v) |