(maint) Fix resource ordering when apt-transport-https is needed (#1015)
authorRomain Tartière <romain@blogreen.org>
Mon, 21 Feb 2022 14:19:25 +0000 (04:19 -1000)
committerGitHub <noreply@github.com>
Mon, 21 Feb 2022 14:19:25 +0000 (14:19 +0000)
Adds a dependency to ensure apt-transport-https is installed when the
repositories are updated.

manifests/source.pp

index 54cfadfe14fa422694001acbbdfd524bc2829230..c178bd2e4b810139c14f23886f7102e637d51284 100644 (file)
@@ -102,6 +102,7 @@ define apt::source(
     $_transport_https_releases = [ 'wheezy', 'jessie', 'stretch', 'trusty', 'xenial' ]
     if ($facts['os']['distro']['codename'] in $_transport_https_releases) and $_location =~ /(?i:^https:\/\/)/ {
       ensure_packages('apt-transport-https')
+      Package['apt-transport-https'] -> Class['apt::update']
     }
   } else {
     $_location = undef