1 # If your environment includes mint you'll need something more like this:
3 #$location = $::lsbdistcodename ? {
4 # 'squeeze' => 'http://backports.debian.org/debian-backports',
5 # 'wheezy' => 'http://ftp.debian.org/debian/',
6 # 'debian' => 'http://ftp.debian.org/debian/', #thanks LinuxMint
7 # default => 'http://us.archive.ubuntu.com/ubuntu',
10 #if ($::lsbdistid == 'LinuxMint' and $::lsbdistcodename == 'debian') or $::lsbdistid == 'Debian' {
11 # $repos = 'main contrib non-free'
12 # $key = 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553'
13 # if $::lsbdistid == 'LinuxMint' {
16 # $release = downcase($::lsbdistrelease)
19 # if $::lsbdistid == 'LinuxMint' {
20 # $release = $::lsbdistcodename ? {
21 # 'qiana' => 'trusty',
23 # 'olivia' => 'raring',
24 # 'nadia' => 'quantal',
25 # 'maya' => 'precise',
28 # $release = downcase($::lsbdistrelease)
30 # $repos = 'main universe multiverse restricted'
31 # $key = '630239CC130E1A7FD81A27B140976EAF437D05B5'
34 ## Start logic to figure out backports location, repos, key, and release
35 if $::lsbdistid == 'Debian' {
36 $repos = 'main contrib non-free'
37 $key = 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553'
38 $release = downcase($::lsbdistrelease)
39 $location = $::lsbdistcodename ? {
40 'squeeze' => 'http://backports.debian.org/debian-backports',
41 'wheezy' => 'http://ftp.debian.org/debian/',
42 default => 'http://http.debian.net/debian/',
45 $release = downcase($::lsbdistrelease)
46 $repos = 'main universe multiverse restricted'
47 $key = '630239CC130E1A7FD81A27B140976EAF437D05B5'
48 $location = 'http://us.archive.ubuntu.com/ubuntu',
50 ## end logic for variables
53 # set up the actual backports
54 apt::pin { 'backports':
55 before => Apt::Source['backports'],
56 release => "${release}-backports",
60 apt::source { 'backports':
61 location => $location,
62 release => "${release}-backports",
66 server => 'pgp.mit.edu',