From e12a15a7a87e09548a46db56b2e9b5a79b9d7061 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Mon, 22 Apr 2024 13:49:20 +0100 Subject: [PATCH] Add ruby versions for ubuntu 24.04 --- cookbooks/fail2ban/recipes/default.rb | 2 +- cookbooks/php/attributes/default.rb | 1 + cookbooks/ruby/attributes/default.rb | 19 +++++++++++++------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/cookbooks/fail2ban/recipes/default.rb b/cookbooks/fail2ban/recipes/default.rb index a218eb580..f473c47f1 100644 --- a/cookbooks/fail2ban/recipes/default.rb +++ b/cookbooks/fail2ban/recipes/default.rb @@ -26,7 +26,7 @@ package %w[ logrotate ] -if platform?("debian") +if platform?("debian") || (platform?("ubuntu") && node[:lsb][:release].to_f >= 24.04) package "python3-inotify" else package "gamin" diff --git a/cookbooks/php/attributes/default.rb b/cookbooks/php/attributes/default.rb index de839f30d..e4c142e8c 100644 --- a/cookbooks/php/attributes/default.rb +++ b/cookbooks/php/attributes/default.rb @@ -15,4 +15,5 @@ default[:php][:version] = if platform?("debian") "7.4" # PHP version for Ubuntu 20.04 end end + default[:php][:fpm][:options] = {} diff --git a/cookbooks/ruby/attributes/default.rb b/cookbooks/ruby/attributes/default.rb index 35bf098a1..fa5f4f317 100644 --- a/cookbooks/ruby/attributes/default.rb +++ b/cookbooks/ruby/attributes/default.rb @@ -1,16 +1,23 @@ default[:ruby][:fullstaq] = true default[:ruby][:system_version] = if platform?("debian") - if node[:platform_version].to_i >= 13 + case node[:platform_version].to_i + when 13 "3.3" - else + when 12 "3.1" end - elsif node[:lsb][:release].to_f < 22.04 - "2.7" - else - "3.0" + elsif platform?("ubuntu") + case node[:lsb][:release].to_f + when 24.04 + "3.2" # ruby version for Ubuntu 24.04 + when 22.04 + "3.0" # ruby version for Ubuntu 22.04 + when 20.04 + "2.7" # ruby version for Ubuntu 20.04 + end end + default[:ruby][:system_interpreter] = "/usr/bin/ruby#{node[:ruby][:system_version]}" default[:ruby][:system_gem] = "/usr/bin/gem#{node[:ruby][:system_version]}" default[:ruby][:system_bundle] = "/usr/bin/bundle#{node[:ruby][:system_version]}" -- 2.39.5