Allow the name of the git backup file to be configured
authorTom Hughes <tom@compton.nu>
Wed, 2 Oct 2013 18:03:43 +0000 (19:03 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 2 Oct 2013 18:03:43 +0000 (19:03 +0100)
cookbooks/git/templates/default/backup.cron.erb
roles/git.rb

index 16f85593b53019359230cc964f85b95a3737beed..13f1067b16ec56f0ad95ddb2ca9c499e10c692c1 100644 (file)
@@ -4,7 +4,7 @@
 
 T=$(mktemp -d -t -p /var/tmp git.XXXXXXXXXX)
 D=$(date +%Y-%m-%d)
-B=git-$D.tar.gz
+B=<%= node[:git][:backup] %>-$D.tar.gz
 
 ln -s /var/lib/git $T/git-$D
 
index 0b41762234c1566835c8ba1ec3575a7b989cc508..56670944e6640f49194b5d9c4b2cc71c23fc4e63 100644 (file)
@@ -23,7 +23,8 @@ default_attributes(
     }
   },
   :git => {
-    :host => "git.openstreetmap.org"
+    :host => "git.openstreetmap.org",
+    :backup => "git"
   }
 )