From 6fe04fdaa0c0a533807fc4e0597ef872f9241b91 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Mon, 6 May 2024 17:08:42 +0900 Subject: [PATCH] Add cases for Ubuntu 24.04. --- cookbooks/base/timezone.rb | 2 +- cookbooks/base/unattended-upgrade.rb | 2 +- cookbooks/vault/attributes.rb | 2 +- cookbooks/vector/attributes.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbooks/base/timezone.rb b/cookbooks/base/timezone.rb index 548851b..c5bf6ed 100644 --- a/cookbooks/base/timezone.rb +++ b/cookbooks/base/timezone.rb @@ -1,5 +1,5 @@ case node['platform_version'] -when "18.04", "20.04", "22.04" +when "18.04", "20.04", "22.04", "24.04" execute 'timedatectl set-timezone Asia/Tokyo' do not_if 'timedatectl | grep Tokyo' end diff --git a/cookbooks/base/unattended-upgrade.rb b/cookbooks/base/unattended-upgrade.rb index 07adc5f..1a522aa 100644 --- a/cookbooks/base/unattended-upgrade.rb +++ b/cookbooks/base/unattended-upgrade.rb @@ -45,7 +45,7 @@ when "18.04" not_if 'test -e /var/log/cron-apt/log' end -when '20.04', '22.04' +when '20.04', '22.04', '24.04' %w(20auto-upgrades 50unattended-upgrades).each do |conf| remote_file "/etc/apt/apt.conf.d/#{conf}" do owner 'root' diff --git a/cookbooks/vault/attributes.rb b/cookbooks/vault/attributes.rb index 0bcaa8b..1eeecba 100644 --- a/cookbooks/vault/attributes.rb +++ b/cookbooks/vault/attributes.rb @@ -3,7 +3,7 @@ # ------------------------------------------- case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp -when "20.04", "22.04" +when "20.04", "22.04", "24.04" cmd = 'LANG=C ip a | grep "inet " | grep -v -E "(127|172)" | cut -d" " -f6 | perl -pe "s/\/.+//g"' when "18.04" diff --git a/cookbooks/vector/attributes.rb b/cookbooks/vector/attributes.rb index 8c312fd..94f2d5a 100644 --- a/cookbooks/vector/attributes.rb +++ b/cookbooks/vector/attributes.rb @@ -2,7 +2,7 @@ # Specifying the default settings: # ------------------------------------------- case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp -when "20.04", "22.04" +when "20.04", "22.04", "24.04" cmd = 'LANG=C ip a | grep "inet " | grep -v -E "(127|172)" | cut -d" " -f6 | perl -pe "s/\/.+//g"' when "18.04"