]> git.openstreetmap.org Git - chef.git/blob - cookbooks/backup/recipes/default.rb
Install libdate-calc-perl for the backup expiry script
[chef.git] / cookbooks / backup / recipes / default.rb
1 #
2 # Cookbook Name:: backup
3 # Recipe:: default
4 #
5 # Copyright 2013, OpenStreetMap Foundation
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #     http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19
20 package "perl"
21 package "libdate-calc-perl"
22
23 directory "/store/backup" do
24   owner "osmbackup"
25   group "osmbackup"
26   mode 02755
27 end
28
29 cookbook_file "/usr/local/bin/expire-backups" do
30   owner "root"
31   group "root"
32   mode 0755
33 end
34
35 template "/etc/cron.daily/expire-backups" do
36   source "expire.cron.erb"
37   owner "root"
38   group "root"
39   mode 0755
40 end