X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7b9ec4b60ee39614d1d083d7220e76b07d2b275f..11fdc9157c3243a489cd1c5f05b1abd686952555:/cookbooks/chef/recipes/repository.rb diff --git a/cookbooks/chef/recipes/repository.rb b/cookbooks/chef/recipes/repository.rb index b4bd2fa06..4eaa409bc 100644 --- a/cookbooks/chef/recipes/repository.rb +++ b/cookbooks/chef/recipes/repository.rb @@ -24,7 +24,7 @@ keys = data_bag_item("chef", "keys") directory "/var/lib/chef" do owner "chefrepo" group "chefrepo" - mode 02775 + mode 0o2775 end git "/var/lib/chef" do @@ -38,26 +38,33 @@ end directory "/var/lib/chef/.chef" do owner "chefrepo" group "chefrepo" - mode 02775 + mode 0o2775 end file "/var/lib/chef/.chef/client.pem" do - content keys["chef-git"].join("\n") + content keys["git"].join("\n") owner "chefrepo" group "chefrepo" - mode 0660 + mode 0o660 end cookbook_file "/var/lib/chef/.chef/knife.rb" do source "knife.rb" owner "chefrepo" group "chefrepo" - mode 0660 + mode 0o660 end template "#{node[:chef][:repository]}/hooks/post-receive" do source "post-receive.erb" owner "chefrepo" group "chefrepo" - mode 0750 + mode 0o750 +end + +template "/etc/cron.daily/chef-repository-backup" do + source "repository-backup.cron.erb" + owner "root" + group "root" + mode 0o755 end