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"
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
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"
g++
make
]
-
-if node[:lsb][:release].to_f < 18.04
- package "nodejs-legacy"
-end
-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"