(MODULES-10971) - Ensure `apt::keyserver` is considered when creating a default apt...
authorDavid Swan <david.swan@puppet.com>
Wed, 24 Mar 2021 14:39:58 +0000 (14:39 +0000)
committerDavid Swan <david.swan@puppet.com>
Wed, 24 Mar 2021 16:25:55 +0000 (16:25 +0000)
As it stands the source_key_defaults point towards the default `keyserver` value set within the params. This change makes it so that it will instead use the `keyserver` value set in the init, which will in turn default to the params value in none has been given.

manifests/init.pp
manifests/params.pp

index 3c96de81d1ae0ab0574e9dac12cf531cff64899c..fdfd600781b9fb2cfbbedf10ff2a6de1451499b5 100644 (file)
@@ -153,8 +153,15 @@ class apt (
   String $preferences_d         = $apt::params::preferences_d,
   String $apt_conf_d            = $apt::params::apt_conf_d,
   Hash $config_files            = $apt::params::config_files,
-  Hash $source_key_defaults     = $apt::params::source_key_defaults,
   Boolean $sources_list_force   = $apt::params::sources_list_force,
+
+  Hash $source_key_defaults = {
+    'server'  => $keyserver,
+    'options' => undef,
+    'content' => undef,
+    'source'  => undef,
+  }
+
 ) inherits apt::params {
 
   if $facts['os']['family'] != 'Debian' {
index 6167ea505d75adc7bc52d3442d1d0c6b546e4076..58ce9ed2831939e848e543200610a6b171169b07 100644 (file)
@@ -71,13 +71,6 @@ class apt::params {
     'apt.conf.d'     => false,
   }
 
-  $source_key_defaults = {
-    'server'  => $keyserver,
-    'options' => undef,
-    'content' => undef,
-    'source'  => undef,
-  }
-
   $include_defaults = {
     'deb' => true,
     'src' => false,