]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Merge pull request #1039 from david22swan/GH-1036/main/dependency_cycle
authorCraig Gumbley <craiggumbley@gmail.com>
Mon, 20 Jun 2022 12:32:19 +0000 (13:32 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Jun 2022 12:32:19 +0000 (13:32 +0100)
(ISSUE-1036) Conditional `gnupg` include added to init.pp

manifests/init.pp

index 4aa4a68ccd4c70dd7d8a1267b2309caa8d09cdce..704311061b6df0e7f6d649c70721554e29d84ad1 100644 (file)
@@ -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
+    }
+  }
 }