X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/93c098cdc4f22b1fe69ecd88b3ac2d2b211780ff..2853b414b3706db2890068f45a91b170058168cd:/cookbooks/chef/recipes/repository.rb diff --git a/cookbooks/chef/recipes/repository.rb b/cookbooks/chef/recipes/repository.rb index a358e78e2..752938bf3 100644 --- a/cookbooks/chef/recipes/repository.rb +++ b/cookbooks/chef/recipes/repository.rb @@ -1,8 +1,8 @@ # -# Cookbook Name:: chef +# Cookbook:: chef # Recipe:: repository # -# Copyright 2013, OpenStreetMap Foundation +# Copyright:: 2013, OpenStreetMap Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,14 +17,19 @@ # limitations under the License. # +include_recipe "chef::knife" include_recipe "git" keys = data_bag_item("chef", "keys") +chef_gem "bundler" do + version ">= 2.1.4" +end + directory "/var/lib/chef" do owner "chefrepo" group "chefrepo" - mode 0o2775 + mode "2775" end %w[public private].each do |repository| @@ -41,28 +46,28 @@ end directory "/var/lib/chef/#{repository}/.chef" do owner "chefrepo" group "chefrepo" - mode 0o2775 + mode "2775" end file "/var/lib/chef/#{repository}/.chef/client.pem" do content keys["git"].join("\n") owner "chefrepo" group "chefrepo" - mode 0o660 + mode "660" end cookbook_file "/var/lib/chef/#{repository}/.chef/knife.rb" do source "knife.rb" owner "chefrepo" group "chefrepo" - mode 0o660 + mode "660" end template "#{repository_directory}/hooks/post-receive" do source "post-receive.erb" owner "chefrepo" group "chefrepo" - mode 0o750 + mode "750" variables :repository => repository end end