6734e05297629cfad9d91b4643b45d629c5da47a
[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_locations
27 ) inherits apt::params {
28
29   apt::source { 'backports.list':
30     location   => $location,
31     release    => "${release}-backports",
32     repos      => $lsbdistid ? {
33       'debian' => 'main contrib non-free',
34       'ubuntu' => 'universe multiverse restricted',
35     },
36     key        => $lsbdistid ? {
37       'debian' => '55BE302B',
38       'ubuntu' => '437D05B5',
39     },
40     key_server => 'pgp.mit.edu',
41     pin        => '200',
42     notify => Exec["apt-get update"],
43   }
44 }
45