Hash $settings = $apt::params::settings,
Boolean $manage_auth_conf = $apt::params::manage_auth_conf,
Array[Apt::Auth_conf_entry]
- $auth_conf_entries = $apt::params::auth_conf_entries,
+ $auth_conf_entries = $apt::params::auth_conf_entries,
String $auth_conf_owner = $apt::params::auth_conf_owner,
String $root = $apt::params::root,
String $sources_list = $apt::params::sources_list,
}
) inherits apt::params {
-
if $facts['os']['family'] != 'Debian' {
fail('This module only works on Debian or derivatives like Ubuntu')
}
$_perhost = {}
}
- $_proxy = merge($apt::proxy_defaults, $proxy, { 'perhost' => $_perhost } )
+ $_proxy = merge($apt::proxy_defaults, $proxy, { 'perhost' => $_perhost })
$confheadertmp = epp('apt/_conf_header.epp')
- $proxytmp = epp('apt/proxy.epp', {'proxies' => $_proxy})
+ $proxytmp = epp('apt/proxy.epp', { 'proxies' => $_proxy })
$updatestamptmp = epp('apt/15update-stamp.epp')
if $_proxy['ensure'] == 'absent' or $_proxy['host'] {
true => nil,
default => undef,
}
- }
- else
- {
+ } else {
$sources_list_ensure = $_purge['sources.list'] ? {
true => file,
default => file,
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
+ }
+ }
}