From 52fb5028cfb36bf1b9490aea22cde7127dbe00ce Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 9 Jan 2019 22:52:32 +0000 Subject: [PATCH] Drop Ubuntu 16.04 compatibility where it is no longer needed --- cookbooks/db/recipes/base.rb | 8 +------- cookbooks/geodns/recipes/default.rb | 6 ++---- cookbooks/mysql/recipes/default.rb | 8 +------- cookbooks/nodejs/recipes/default.rb | 4 ---- cookbooks/passenger/attributes/default.rb | 2 +- 5 files changed, 5 insertions(+), 23 deletions(-) diff --git a/cookbooks/db/recipes/base.rb b/cookbooks/db/recipes/base.rb index 6d6bc8ddc..2062b63bc 100644 --- a/cookbooks/db/recipes/base.rb +++ b/cookbooks/db/recipes/base.rb @@ -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" diff --git a/cookbooks/geodns/recipes/default.rb b/cookbooks/geodns/recipes/default.rb index 250f148c4..da1acad06 100644 --- a/cookbooks/geodns/recipes/default.rb +++ b/cookbooks/geodns/recipes/default.rb @@ -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 diff --git a/cookbooks/mysql/recipes/default.rb b/cookbooks/mysql/recipes/default.rb index ffe699d85..5cedc301f 100644 --- a/cookbooks/mysql/recipes/default.rb +++ b/cookbooks/mysql/recipes/default.rb @@ -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" diff --git a/cookbooks/nodejs/recipes/default.rb b/cookbooks/nodejs/recipes/default.rb index 87af7d656..602f91622 100644 --- a/cookbooks/nodejs/recipes/default.rb +++ b/cookbooks/nodejs/recipes/default.rb @@ -23,7 +23,3 @@ package %w[ g++ make ] - -if node[:lsb][:release].to_f < 18.04 - package "nodejs-legacy" -end diff --git a/cookbooks/passenger/attributes/default.rb b/cookbooks/passenger/attributes/default.rb index 29f75e3ae..753a8d099 100644 --- a/cookbooks/passenger/attributes/default.rb +++ b/cookbooks/passenger/attributes/default.rb @@ -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" -- 2.39.5