Skip to content

Commit

Permalink
Switch using os.release.major for apt-transport-https
Browse files Browse the repository at this point in the history
Signed-off-by: Christos Papageorgiou <christos.papageorgioy@gmail.com>
  • Loading branch information
root-expert committed Mar 15, 2022
1 parent 47b92ef commit 24f3aba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifests/source.pp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
$_location = $location
}
# Newer oses, do not need the package for HTTPS transport.
$_transport_https_releases = [ 'wheezy', 'jessie', 'stretch', 'trusty', 'xenial' ]
if (fact('os.distro.codename') in $_transport_https_releases) and $_location =~ /(?i:^https:\/\/)/ {
$_transport_https_releases = [ '7', '8', '9', '14.04', '16.04' ]
if (fact('os.release.major') in $_transport_https_releases) and $_location =~ /(?i:^https:\/\/)/ {
ensure_packages('apt-transport-https')
Package['apt-transport-https'] -> Class['apt::update']
}
Expand Down

0 comments on commit 24f3aba

Please sign in to comment.