Drop Ubuntu 16.04 compatibility where it is no longer needed
authorTom Hughes <tom@compton.nu>
Wed, 9 Jan 2019 22:52:32 +0000 (22:52 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 9 Jan 2019 22:52:32 +0000 (22:52 +0000)
cookbooks/db/recipes/base.rb
cookbooks/geodns/recipes/default.rb
cookbooks/mysql/recipes/default.rb
cookbooks/nodejs/recipes/default.rb
cookbooks/passenger/attributes/default.rb

index 6d6bc8d..2062b63 100644 (file)
@@ -34,14 +34,8 @@ directory "/srv/www.openstreetmap.org" do
   mode 0o2775
 end
 
-ruby_version = if node[:lsb][:release].to_f >= 18.04
-                 "2.5"
-               else
-                 "2.3"
-               end
-
 rails_port "www.openstreetmap.org" do
-  ruby ruby_version
+  ruby "2.5"
   directory "/srv/www.openstreetmap.org/rails"
   user "rails"
   group "rails"
index 250f148..da1acad 100644 (file)
@@ -38,10 +38,8 @@ template "/etc/gdnsd/zones/geo.openstreetmap.org" do
   notifies :restart, "service[gdnsd]"
 end
 
-if node[:lsb][:release].to_f >= 18.04
-  service "systemd-resolved" do
-    action [:disable, :stop]
-  end
+service "systemd-resolved" do
+  action [:disable, :stop]
 end
 
 service "gdnsd" do
index ffe699d..5cedc30 100644 (file)
@@ -25,13 +25,7 @@ service "mysql" do
   supports :status => true, :restart => true
 end
 
-conf_file = if node[:lsb][:release].to_f >= 16.04
-              "/etc/mysql/mysql.conf.d/zzz-chef.cnf"
-            else
-              "/etc/mysql/conf.d/zzz-chef.cnf"
-            end
-
-template conf_file do
+template "/etc/mysql/mysql.conf.d/zzz-chef.cnf" do
   source "my.cnf.erb"
   owner "root"
   group "root"
index 87af7d6..602f916 100644 (file)
@@ -23,7 +23,3 @@ package %w[
   g++
   make
 ]
-
-if node[:lsb][:release].to_f < 18.04
-  package "nodejs-legacy"
-end
index 29f75e3..753a8d0 100644 (file)
@@ -1,4 +1,4 @@
-default[:passenger][:ruby_version] = node[:lsb][:release].to_f >= 18.04 ? "2.5" : "2.3"
+default[:passenger][:ruby_version] = "2.5"
 default[:passenger][:max_pool_size] = 6
 default[:passenger][:pool_idle_time] = 300
 default[:passenger][:instance_registry_dir] = "/run/passenger"