cb2d2d3005606afbcde2cc9c1b6b6ac5223a4947
[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           $legacy_origin       = true
14           $origins             = ['${distro_id} ${distro_codename}-security']
15         }
16         'wheezy': {
17           $backports_location = 'http://ftp.debian.org/debian/'
18           $legacy_origin      = false
19           $origins            = ['origin=Debian,archive=stable,label=Debian-Security']
20         }
21         default: {
22           $backports_location = 'http://http.debian.net/debian/'
23           $legacy_origin      = false
24           $origins            = ['origin=Debian,archive=stable,label=Debian-Security']
25         }
26       }
27     }
28     'ubuntu': {
29       case $::lsbdistcodename {
30         'lucid': {
31           $backports_location = 'http://us.archive.ubuntu.com/ubuntu'
32           $ppa_options        = undef
33           $legacy_origin      = true
34           $origins            = ['${distro_id} ${distro_codename}-security']
35         }
36         'precise', 'trusty': {
37           $backports_location = 'http://us.archive.ubuntu.com/ubuntu'
38           $ppa_options        = '-y'
39           $legacy_origin      = true
40           $origins            = ['${distro_id}:${distro_codename}-security']
41         }
42         default: {
43           $backports_location = 'http://old-releases.ubuntu.com/ubuntu'
44           $ppa_options        = '-y'
45           $legacy_origin      = true
46           $origins            = ['${distro_id}:${distro_codename}-security']
47         }
48       }
49     }
50     default: {
51       fail("Unsupported osfamily (${::osfamily}) or lsbdistid (${::lsbdistid})")
52     }
53   }
54 }