From 0ca3c30dec52c6097713db2f8985de7b0f41852b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Romain=20Tarti=C3=A8re?= Date: Wed, 16 Feb 2022 14:54:06 -1000 Subject: [PATCH] (maint) Fix resource ordering when apt-transport-https is needed On older Debian / Ubuntu releases, the apt-transport-https package is required to download from an https:// source. This package dependency is ensured by ensure_packages() but no ordering is set, possibly resulting of the resource being applied in a non-working order: 1. Setup a https:// source 2. Trigger apt update (this will fail) 3. Install apt-transport-https Add a dependency to ensure apt-transport-https is installed when the repositories are updated. --- manifests/source.pp | 1 + 1 file changed, 1 insertion(+) diff --git a/manifests/source.pp b/manifests/source.pp index 54cfadf..c178bd2 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -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 -- 2.45.2