From: Bruno Travouillon Date: Fri, 27 Oct 2017 21:47:36 +0000 (+0200) Subject: Install apt-transport-https in Debian 8 if needed X-Git-Tag: 4.4.1~10^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=811bbd90db7b205c3f32f35ee3919e4564192af0;p=puppet-modules%2Fpuppetlabs-apt.git Install apt-transport-https in Debian 8 if needed Without this package, the module fails to update a repository with a location using the https method. --- diff --git a/manifests/source.pp b/manifests/source.pp index a95bc59..3e6d0cb 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -29,8 +29,15 @@ define apt::source( $_release = $release } - if $ensure == 'present' and ! $location { - fail('cannot create a source entry without specifying a location') + if $ensure == 'present' { + if ! $location { + fail('cannot create a source entry without specifying a location') + } elsif $_release == 'jessie' { + $method = split($location, '[:\/]+')[0] + if $method == 'https' { + ensure_packages('apt-transport-https') + } + } } $includes = merge($::apt::include_defaults, $include)