]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/recipes/cleanup.rb
Run statistics and cleanup scripts with right ruby version
[chef.git] / cookbooks / web / recipes / cleanup.rb
index 8b8faca43f1bcb4ac3cdea3d9021b39ba6f0525c..2b1039020f1ae0532a8a3a8ccc9703ff732f1f38 100644 (file)
 
 include_recipe "web::base"
 
+ruby = "ruby#{node[:passenger][:ruby_version]}"
+rails_directory = "#{node[:web][:base_directory]}/rails"
+
 template "/etc/cron.daily/web-cleanup" do
   source "cleanup.cron.erb"
   owner "root"
   group "root"
   mode 0755
+  variables :ruby => ruby, :directory => rails_directory
 end