From 0ee02f2cb1a86e7196b0c4bc620010deb503c583 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 2 Oct 2013 19:03:43 +0100 Subject: [PATCH] Allow the name of the git backup file to be configured --- cookbooks/git/templates/default/backup.cron.erb | 2 +- roles/git.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cookbooks/git/templates/default/backup.cron.erb b/cookbooks/git/templates/default/backup.cron.erb index 16f85593b..13f1067b1 100644 --- a/cookbooks/git/templates/default/backup.cron.erb +++ b/cookbooks/git/templates/default/backup.cron.erb @@ -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 diff --git a/roles/git.rb b/roles/git.rb index 0b4176223..56670944e 100644 --- a/roles/git.rb +++ b/roles/git.rb @@ -23,7 +23,8 @@ default_attributes( } }, :git => { - :host => "git.openstreetmap.org" + :host => "git.openstreetmap.org", + :backup => "git" } ) -- 2.43.2