]> git.openstreetmap.org Git - chef.git/commitdiff
Use ruby 2.3 on Ubuntu 16.04 database servers
authorTom Hughes <tom@compton.nu>
Wed, 27 Jul 2016 17:50:38 +0000 (18:50 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 27 Jul 2016 17:50:38 +0000 (18:50 +0100)
cookbooks/db/recipes/base.rb

index 17dd43d116247388004f980739ea78226ed059e0..4ed0a1e5ca962aa7509827655ea55cad779df891 100644 (file)
@@ -32,8 +32,14 @@ directory "/srv/www.openstreetmap.org" do
   mode 0o2775
 end
 
   mode 0o2775
 end
 
+ruby_version = if node[:lsb][:release].to_f >= 16.04
+                 "2.3"
+               else
+                 "2.1"
+               end
+
 rails_port "www.openstreetmap.org" do
 rails_port "www.openstreetmap.org" do
-  ruby "2.1"
+  ruby ruby_version
   directory "/srv/www.openstreetmap.org/rails"
   user "rails"
   group "rails"
   directory "/srv/www.openstreetmap.org/rails"
   user "rails"
   group "rails"