X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fsource.pp;h=365ba13dedc69382dc317772285638f075a6f745;hb=ee7d7762d434d2a7409030e0e4c746aa9ec65b53;hp=cb75635797ca882832467d64be7d8228b86765aa;hpb=2e27931668313bef2e6a216503a82e96098eae6d;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/source.pp b/manifests/source.pp index cb75635..365ba13 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -86,11 +86,19 @@ define apt::source( if ! $location { fail(translate('cannot create a source entry without specifying a location')) } + elsif ($::apt::proxy['https_acng']) and ($location =~ /(?i:^https:\/\/)/) { + $_location = regsubst($location, 'https://','http://HTTPS///') + } + else { + $_location = $location + } # Newer oses, do not need the package for HTTPS transport. $_transport_https_releases = [ 'wheezy', 'jessie', 'stretch', 'trusty', 'xenial' ] - if ($facts['lsbdistcodename'] in $_transport_https_releases) and $location =~ /(?i:^https:\/\/)/ { + if ($facts['lsbdistcodename'] in $_transport_https_releases) and $_location =~ /(?i:^https:\/\/)/ { ensure_packages('apt-transport-https') } + } else { + $_location = undef } $includes = merge($::apt::include_defaults, $include) @@ -113,7 +121,7 @@ define apt::source( 'includes' => $includes, 'opt_architecture' => $architecture, 'allow_unsigned' => $allow_unsigned, - 'location' => $location, + 'location' => $_location, 'release' => $_release, 'repos' => $repos, })