From: willmeek Date: Thu, 2 Nov 2017 16:23:55 +0000 (+0000) Subject: Merge pull request #714 from actatux/apt-transport-https_debian8 X-Git-Tag: 4.4.0~11 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e9b2b123c7e06ec753f1bd49b91ca983957b66b9;hp=dc3ead0ed5f4d735869565660c982983d379a519;p=puppet-modules%2Fpuppetlabs-apt.git Merge pull request #714 from actatux/apt-transport-https_debian8 Install apt-transport-https in Debian 8 if needed --- 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)