Add «main» to Ubuntu backports repos.
[puppet-modules/puppetlabs-apt.git] / manifests / backports.pp
1 # This adds the necessary components to get backports for ubuntu and debian
2 #
3 # == Parameters
4 #
5 # [*release*]
6 #   The ubuntu/debian release name. Defaults to $lsbdistcodename. Setting this
7 #   manually can cause undefined behavior. (Read: universe exploding)
8 #
9 # == Examples
10 #
11 #   include apt::backports
12 #
13 #   class { 'apt::backports':
14 #     release => 'natty',
15 #   }
16 #
17 # == Authors
18 #
19 # Ben Hughes, I think. At least blame him if this goes wrong. I just added puppet doc.
20 #
21 # == Copyright
22 #
23 # Copyright 2011 Puppet Labs Inc, unless otherwise noted.
24 class apt::backports(
25   $release  = $::lsbdistcodename,
26   $location = $apt::params::backports_location
27 ) inherits apt::params {
28
29   $release_real = downcase($release)
30
31   apt::source { 'backports':
32     location   => $location,
33     release    => "${release_real}-backports",
34     repos      => $::lsbdistid ? {
35       'debian' => 'main contrib non-free',
36       'ubuntu' => 'main universe multiverse restricted',
37     },
38     key        => $::lsbdistid ? {
39       'debian' => '55BE302B',
40       'ubuntu' => '437D05B5',
41     },
42     key_server => 'pgp.mit.edu',
43     pin        => '200',
44   }
45 }