From b7adba7c312f289755c523792398829170c6fad5 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 28 Apr 2020 15:21:44 -0700 Subject: [PATCH] Update platform support in the install resource Remove Ubuntu 14.04 (EOL) Remove Ubuntu 17.04 (EOL) Remove Debian 8 (EOL in a few months) Add Ubuntu 20.04 Signed-off-by: Tim Smith --- libraries/docker_installation_package.rb | 26 ++++++++++-------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/libraries/docker_installation_package.rb b/libraries/docker_installation_package.rb index 46b5361a9a..5622f0f918 100644 --- a/libraries/docker_installation_package.rb +++ b/libraries/docker_installation_package.rb @@ -101,11 +101,6 @@ def ubuntu? false end - def jessie? - return true if node['platform'] == 'debian' && node['platform_version'].to_i == 8 - false - end - def stretch? return true if node['platform'] == 'debian' && node['platform_version'].to_i == 9 false @@ -126,6 +121,11 @@ def bionic? false end + def focal? + return true if node['platform'] == 'ubuntu' && node['platform_version'] == '20.04' + false + end + def amazon? return true if node['platform'] == 'amazon' false @@ -133,20 +133,16 @@ def amazon? # https://github.com/chef/chef/issues/4103 def version_string(v) - codename = if jessie? - 'jessie' - elsif stretch? + codename = if stretch? # deb 9 'stretch' - elsif buster? + elsif buster? # deb 10 'buster' - elsif trusty? - 'trusty' - elsif xenial? + elsif xenial? # ubuntu 16.04 'xenial' - elsif artful? - 'artful' - elsif bionic? + elsif bionic? # ubuntu 18.04 'bionic' + elsif focal? # ubuntu 20.04 + 'focal' end # https://github.com/seemethere/docker-ce-packaging/blob/9ba8e36e8588ea75209d813558c8065844c953a0/deb/gen-deb-ver#L16-L20