]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Merge pull request #718 from willmeek/http_proxy_bypass
authorEric Putnam <putnam.eric@gmail.com>
Wed, 8 Nov 2017 16:41:55 +0000 (08:41 -0800)
committerGitHub <noreply@github.com>
Wed, 8 Nov 2017 16:41:55 +0000 (08:41 -0800)
Http proxy bypass

manifests/source.pp

index 3e6d0cb814870d0b30a4b3bd0fab11282d4e3935..7ce759794b1e758149c180b04a48708ca5c7cbbc 100644 (file)
@@ -29,10 +29,13 @@ define apt::source(
     $_release = $release
   }
 
+  # Some releases do not support https transport with default installation
+  $_transport_https_releases = [ 'jessie', 'stretch', 'trusty', 'xenial' ]
+
   if $ensure == 'present' {
     if ! $location {
       fail('cannot create a source entry without specifying a location')
-    } elsif $_release == 'jessie' {
+    } elsif $_release in $_transport_https_releases {
       $method = split($location, '[:\/]+')[0]
       if $method == 'https' {
         ensure_packages('apt-transport-https')