X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fparams.pp;h=e7bcb33c98df8a22e85d1cc4c39ff1d11ed430be;hb=627eb0b0ce674f6d47c513ba6a96c625ef9ed917;hp=479ac122358b44bc0aff9639d336904b33a65e94;hpb=e99d83c2d6bdd45a9111eab0306da105c1f2acca;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/params.pp b/manifests/params.pp index 479ac12..e7bcb33 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,8 +1,11 @@ -# Setting params for the module +# @summary Provides defaults for the Apt module parameters. +# +# @api private +# class apt::params { if $::osfamily != 'Debian' { - fail('This module only works on Debian or derivatives like Ubuntu') + fail(translate('This module only works on Debian or derivatives like Ubuntu')) } $root = '/etc/apt' @@ -23,6 +26,7 @@ class apt::params { $ppas = {} $pins = {} $settings = {} + $manage_auth_conf = true $auth_conf_entries = [] $config_files = { @@ -83,6 +87,11 @@ class apt::params { } $ppa_options = undef $ppa_package = undef + if versioncmp($facts['os']['release']['major'], '9') >= 0 { + $auth_conf_owner = '_apt' + } else { + $auth_conf_owner = 'root' + } } 'Ubuntu': { $backports = { @@ -92,14 +101,20 @@ class apt::params { } $ppa_options = '-y' $ppa_package = 'software-properties-common' + if versioncmp($facts['os']['release']['full'], '16.04') >= 0 { + $auth_conf_owner = '_apt' + } else { + $auth_conf_owner = 'root' + } } undef: { - fail('Unable to determine value for fact os["name"]') + fail(translate('Unable to determine value for fact os[\"name\"]')) } default: { $ppa_options = undef $ppa_package = undef $backports = undef + $auth_conf_owner = 'root' } } }