Skip to content

Commit

Permalink
Update platform support in the install resource
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tas50 committed Apr 28, 2020
1 parent 7ec8b43 commit b7adba7
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions libraries/docker_installation_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -126,27 +121,28 @@ 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
end

# 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
Expand Down

0 comments on commit b7adba7

Please sign in to comment.