module-puppetlabs-apt/examples/backports.pp

32 lines
812 B
ObjectPascal
Raw Normal View History

$location = $::apt::distcodename ? {
'squeeze' => 'http://backports.debian.org/debian-backports',
'wheezy' => 'http://ftp.debian.org/debian/',
2015-03-25 22:22:52 +01:00
default => 'http://archive.ubuntu.com/ubuntu',
}
2015-03-23 21:13:37 +01:00
if $::apt::distid == 'debian' {
$repos = 'main contrib non-free'
$key = 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553'
$release = $::apt::distcodename
2015-03-23 21:13:37 +01:00
} else {
$repos = 'main universe multiverse restricted'
$key = '630239CC130E1A7FD81A27B140976EAF437D05B5'
$release = $::apt::distcodename
2015-03-23 21:13:37 +01:00
}
# set up the actual backports
apt::pin { 'backports':
release => "${release}-backports",
priority => 200,
}
apt::source { 'backports':
location => $location,
release => "${release}-backports",
repos => $repos,
key => {
2015-03-25 22:22:52 +01:00
id => $key,
server => 'pgp.mit.edu',
2015-03-23 21:13:37 +01:00
},
}