From: David Swan Date: Wed, 24 Mar 2021 14:39:58 +0000 (+0000) Subject: (MODULES-10971) - Ensure `apt::keyserver` is considered when creating a default apt... X-Git-Tag: v8.0.2~2^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a6eb1618bad986cfa40e9e9188dc6625c89a8fea;p=puppet-modules%2Fpuppetlabs-apt.git (MODULES-10971) - Ensure `apt::keyserver` is considered when creating a default apt:source 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. --- diff --git a/manifests/init.pp b/manifests/init.pp index 3c96de8..fdfd600 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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' { diff --git a/manifests/params.pp b/manifests/params.pp index 6167ea5..58ce9ed 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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,