X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fparams.pp;h=5a0c170d9120ddc1ce14b62fe2e9167d10b4d216;hb=33c296b963a433c6fe5584b0fd1148c7330c69d0;hp=42dd6b01290bae1783aadccaaae56eb84708f572;hpb=1c707c7d323f80502e09008351c5007b385a1c97;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/params.pp b/manifests/params.pp index 42dd6b0..5a0c170 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,9 +1,5 @@ class apt::params { - if defined('$caller_module_name') and $caller_module_name and $caller_module_name != $module_name { - fail('apt::params is a private class and cannot be accessed directly') - } - if $::osfamily != 'Debian' { fail('This module only works on Debian or derivatives like Ubuntu') } @@ -61,7 +57,6 @@ class apt::params { } $update_defaults = { - 'always' => false, 'frequency' => 'reluctantly', 'timeout' => undef, 'tries' => undef, @@ -74,10 +69,10 @@ class apt::params { } $purge_defaults = { - 'sources.list' => true, - 'sources.list.d' => true, - 'preferences' => true, - 'preferences.d' => true, + 'sources.list' => false, + 'sources.list.d' => false, + 'preferences' => false, + 'preferences.d' => false, } $source_key_defaults = { @@ -87,36 +82,38 @@ class apt::params { 'source' => undef, } + $include_defaults = { + 'deb' => true, + 'src' => false, + } + case $xfacts['lsbdistid'] { - 'ubuntu', 'debian': { - $distid = $xfacts['lsbdistid'] - $distcodename = $xfacts['lsbdistcodename'] - } - 'linuxmint': { - if $xfacts['lsbdistcodename'] == 'debian' { - $distid = 'debian' - $distcodename = 'wheezy' - } else { - $distid = 'ubuntu' - $distcodename = $xfacts['lsbdistcodename'] ? { - 'qiana' => 'trusty', - 'petra' => 'saucy', - 'olivia' => 'raring', - 'nadia' => 'quantal', - 'maya' => 'precise', + 'debian': { + case $xfacts['lsbdistcodename'] { + 'squeeze': { + $backports = { + 'location' => 'http://backports.debian.org/debian-backports', + 'key' => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553', + 'repos' => 'main contrib non-free', + } + } + default: { + $backports = { + 'location' => 'http://ftp.debian.org/debian/', + 'key' => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553', + 'repos' => 'main contrib non-free', + } } } } - undef: { - fail('Unable to determine lsbdistid, is lsb-release installed?') - } - default: { - fail("Unsupported lsbdistid (${::lsbdistid})") - } - } - case $distid { 'ubuntu': { - case $distcodename { + $backports = { + 'location' => 'http://archive.ubuntu.com/ubuntu', + 'key' => '630239CC130E1A7FD81A27B140976EAF437D05B5', + 'repos' => 'main universe multiverse restricted', + } + + case $xfacts['lsbdistcodename'] { 'lucid': { $ppa_options = undef $ppa_package = 'python-software-properties' @@ -131,13 +128,17 @@ class apt::params { } default: { $ppa_options = '-y' - $ppa_package = 'software-properties-common' + $ppa_package = 'python-software-properties' } } } - '', default: { + undef: { + fail('Unable to determine lsbdistid, is lsb-release installed?') + } + default: { $ppa_options = undef $ppa_package = undef + $backports = undef } } }