From 811bbd90db7b205c3f32f35ee3919e4564192af0 Mon Sep 17 00:00:00 2001 From: Bruno Travouillon Date: Fri, 27 Oct 2017 23:47:36 +0200 Subject: [PATCH] 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. --- manifests/source.pp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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) -- 2.45.2