From 3b45ffb70372fa6516907172f867ff7a7af3ac37 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 10 Oct 2020 15:58:45 +0900 Subject: [PATCH] Modify the OS version to install kernel extra package. --- cookbooks/base/packages.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbooks/base/packages.rb b/cookbooks/base/packages.rb index 4e2e790..65e835c 100644 --- a/cookbooks/base/packages.rb +++ b/cookbooks/base/packages.rb @@ -9,11 +9,12 @@ end # Install the extra kernel: unless node['is_ec2'] case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp - when "18.04" - package 'linux-image-extra-virtual' - else + when "16.04" KERNEL = run_command("uname -r").stdout.chomp package "linux-image-extra-#{KERNEL}" + + when "18.04" + package 'linux-image-extra-virtual' end end