]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
(MODULES-6408) - Fix dirmngr install failing
authorEimhin Laverty <eimhin.laverty@puppet.com>
Wed, 26 Sep 2018 10:27:56 +0000 (11:27 +0100)
committerEimhin Laverty <eimhin.laverty@puppet.com>
Wed, 26 Sep 2018 10:54:45 +0000 (11:54 +0100)
manifests/init.pp

index f3472aca0097e6ce45505ca34587caf1327736ce..27cc09c7a15b2f629df50900e3a715aa285f70c4 100644 (file)
@@ -208,6 +208,13 @@ class apt (
     content  => "${confheadertmp}${updatestamptmp}",
   }
 
+  # Required for adding GPG keys on Debian 9 (and derivatives)
+  $apt_files = [ 'sources.list', 'sources.list.d', 'preferences', 'preferences.d', '/etc/apt/auth.conf' ]
+  package { 'dirmngr':
+    ensure => present,
+    before => [File[$apt_files]]
+  }
+
   file { 'sources.list':
     ensure  => file,
     path    => $::apt::sources_list,
@@ -289,7 +296,4 @@ class apt (
   if $pins {
     create_resources('apt::pin', $pins)
   }
-
-  # required for adding GPG keys on Debian 9 (and derivatives)
-  ensure_packages(['dirmngr'])
 }