X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d80fde945bf46a363d42d245604909ce0d0f3d70..6782e9d4eeaf925882a000a7423afa0633948213:/cookbooks/dev/recipes/default.rb diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index 2e51fa546..849830bc2 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -64,6 +64,7 @@ apache_module "proxy" apache_module "proxy_fcgi" apache_module "rewrite" apache_module "wsgi" +apache_module "headers" gem_package "sqlite3" @@ -133,13 +134,29 @@ search(:accounts, "*:*").each do |account| directory "#{user_home}/public_html" variables :user => name, :port => port end + + template "/etc/sudoers.d/#{name}" do + source "sudoers.user.erb" + owner "root" + group "root" + mode 0440 + variables :user => name + end end -if node[:postgresql][:clusters][:"9.1/main"] +if node[:postgresql][:clusters][:"9.3/main"] postgresql_user "apis" do cluster "9.3/main" end + template "/usr/local/bin/cleanup-rails-assets" do + cookbook "web" + source "cleanup-assets.erb" + owner "root" + group "root" + mode 0755 + end + node[:dev][:rails].each do |name, details| database_name = details[:database] || "apis_#{name}" site_name = "#{name}.apis.dev.openstreetmap.org" @@ -198,7 +215,7 @@ if node[:postgresql][:clusters][:"9.1/main"] recursive true end - file "/etc/cron.daily/rails-#{name}" do + file "/etc/cron.daily/rails-#{site_name.tr('.', '-')}" do action :delete end