]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/taginfo/recipes/default.rb
Add test for taginfo cookbook
[chef.git] / cookbooks / taginfo / recipes / default.rb
index 43cb17b294c40010e9eae86035fc96944424d903..50ea6b86d6f910e40a888e699e75f789a5337767 100644 (file)
@@ -1,8 +1,8 @@
 #
-# Cookbook Name:: taginfo
+# Cookbook:: taginfo
 # Recipe:: default
 #
-# Copyright 2014, OpenStreetMap Foundation
+# Copyright:: 2014, OpenStreetMap Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@
 
 require "json"
 
+include_recipe "accounts"
 include_recipe "apache"
 include_recipe "passenger"
 include_recipe "git"
@@ -54,6 +55,7 @@ package "ruby#{ruby_version}"
 
 gem_package "bundler#{ruby_version}" do
   package_name "bundler"
+  version "~> 1.16.2"
   gem_binary "gem#{ruby_version}"
   options "--format-executable"
 end
@@ -62,10 +64,6 @@ apache_module "cache"
 apache_module "cache_disk"
 apache_module "headers"
 
-file "/etc/cron.d/taginfo" do
-  action :delete
-end
-
 directory "/var/log/taginfo" do
   owner "taginfo"
   group "taginfo"
@@ -160,7 +158,7 @@ node[:taginfo][:sites].each do |site|
     notifies :restart, "passenger_application[#{directory}/taginfo/web/public]"
   end
 
-  %w[taginfo/web/tmp bin data data/old download sources planet planet/log].each do |dir|
+  %w[taginfo/web/tmp bin data data/old download sources].each do |dir|
     directory "#{directory}/#{dir}" do
       owner "taginfo"
       group "taginfo"
@@ -168,14 +166,6 @@ node[:taginfo][:sites].each do |site|
     end
   end
 
-  file "#{directory}/bin/update-planet" do
-    action :delete
-  end
-
-  file "#{directory}/bin/update-taginfo" do
-    action :delete
-  end
-
   template "#{directory}/bin/update" do
     source "update.erb"
     owner "taginfo"
@@ -184,7 +174,9 @@ node[:taginfo][:sites].each do |site|
     variables :name => site_name, :directory => directory
   end
 
-  passenger_application "#{directory}/taginfo/web/public"
+  passenger_application "#{directory}/taginfo/web/public" do
+    action :nothing
+  end
 
   ssl_certificate site_name do
     domains [site_name] + site_aliases