X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fparams.pp;h=5ef175b713d46b5f7caca0e9102b8aa0958160a4;hb=3d3620ccd767ca8c4055f1c84a658c79de31fcb3;hp=c648c4ef992b853cacc0dea271a2ae0c4d21e207;hpb=8038d0a43280307c67cff5c610cb6c023683a10a;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/params.pp b/manifests/params.pp index c648c4e..5ef175b 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,11 +1,10 @@ # @summary Provides defaults for the Apt module parameters. -# +# # @api private # class apt::params { - - if $::osfamily != 'Debian' { - fail(translate('This module only works on Debian or derivatives like Ubuntu')) + if $facts['os']['family'] != 'Debian' { + fail('This module only works on Debian or derivatives like Ubuntu') } $root = '/etc/apt' @@ -44,7 +43,7 @@ class apt::params { 'list' => { 'path' => $sources_list_d, 'ext' => '.list', - } + }, } $update_defaults = { @@ -71,19 +70,12 @@ class apt::params { 'apt.conf.d' => false, } - $source_key_defaults = { - 'server' => $keyserver, - 'options' => undef, - 'content' => undef, - 'source' => undef, - } - $include_defaults = { 'deb' => true, 'src' => false, } - case $facts['os']['name']{ + case $facts['os']['name'] { 'Debian': { $backports = { 'location' => 'http://deb.debian.org/debian', @@ -91,11 +83,7 @@ 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' - } + $auth_conf_owner = '_apt' } 'Ubuntu': { $backports = { @@ -105,14 +93,10 @@ 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' - } + $auth_conf_owner = '_apt' } undef: { - fail(translate('Unable to determine value for fact os[\"name\"]')) + fail('Unable to determine value for fact os[\"name\"]') } default: { $ppa_options = undef