From 8d35d59d7dbd7bf764557f73cce0b0c06fa9aa70 Mon Sep 17 00:00:00 2001 From: david22swan Date: Mon, 20 Jun 2022 11:09:40 +0100 Subject: [PATCH 1/1] (ISSUE-1036) Conditional `gnupg` include added to init.pp Originally removed as it was causing `gnupg` to be installed in all OS when it wasn't needed, removing it seems to have caused a dependency cycle in the relevant Debian family OS for certain community members. Adding the include back within a conditional statement to solve the issue while still preventing it from being included when unneeded. --- manifests/init.pp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 4aa4a68..7043110 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -358,4 +358,20 @@ class apt ( if $pins { create_resources('apt::pin', $pins) } + + case $facts['os']['name'] { + 'Debian': { + if versioncmp($facts['os']['release']['major'], '9') >= 0 { + ensure_packages(['gnupg']) + } + } + 'Ubuntu': { + if versioncmp($facts['os']['release']['full'], '17.04') >= 0 { + ensure_packages(['gnupg']) + } + } + default: { + # Nothing in here + } + } } -- 2.45.2