Missed the - for -y, but also tests were missing lsbdistid
[puppet-modules/puppetlabs-apt.git] / manifests / params.pp
1 class apt::params {
2   $root           = '/etc/apt'
3   $provider       = '/usr/bin/apt-get'
4   $sources_list_d = "${root}/sources.list.d"
5   $apt_conf_d     = "${root}/apt.conf.d"
6   $preferences_d  = "${root}/preferences.d"
7
8   case $::lsbdistid {
9     'debian': {
10       case $::lsbdistcodename {
11         'squeeze': {
12           $backports_location = 'http://backports.debian.org/debian-backports'
13         }
14         'wheezy': {
15           $backports_location = 'http://ftp.debian.org/debian/'
16         }
17         default: {
18           $backports_location = 'http://http.debian.net/debian/'
19         }
20       }
21     }
22     'ubuntu': {
23       case $::lsbdistcodename {
24         'hardy','maverick','natty','oneiric','precise': {
25           $backports_location = 'http://us.archive.ubuntu.com/ubuntu'
26           $ppa_options = '-y'
27         }
28         'lucid': {
29           $backports_location = 'http://us.archive.ubuntu.com/ubuntu'
30           $ppa_options = undef
31         }
32         default: {
33           $backports_location = 'http://old-releases.ubuntu.com/ubuntu'
34           $ppa_options = '-y'
35         }
36       }
37     }
38   }
39 }