Switch using os.release.major for apt-transport-https
authorChristos Papageorgiou <christos.papageorgioy@gmail.com>
Tue, 15 Mar 2022 12:00:56 +0000 (14:00 +0200)
committerChristos Papageorgiou <christos.papageorgioy@gmail.com>
Tue, 15 Mar 2022 12:37:07 +0000 (14:37 +0200)
Signed-off-by: Christos Papageorgiou <christos.papageorgioy@gmail.com>
manifests/source.pp

index 3bcbe8255d51c9b05aca6d52018d01d121a69406..da01ef1319e1c33244b72d80844511a7d249949e 100644 (file)
@@ -99,8 +99,8 @@ define apt::source(
       $_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']
     }