2012-09-20 20:56:10 +02:00
|
|
|
class apt::backports ($priority = 400) {
|
2012-09-20 20:54:38 +02:00
|
|
|
|
|
|
|
$debian_mirror = 'http://backports.debian.org/debian-backports'
|
|
|
|
$ubuntu_mirror = 'http://archive.ubuntu.com/ubuntu'
|
|
|
|
|
|
|
|
$uri = $::operatingsystem ? {
|
|
|
|
Debian => "deb ${debian_mirror} ${::lsbdistcodename}-backports main contrib non-free\n",
|
|
|
|
Ubuntu => "deb ${ubuntu_mirror} ${::lsbdistcodename}-backports main universe multiverse restricted\n",
|
|
|
|
}
|
|
|
|
|
|
|
|
apt::sources_list{'backports':
|
|
|
|
ensure => present,
|
|
|
|
content => $uri,
|
|
|
|
}
|
|
|
|
|
|
|
|
apt::preferences {"${::lsbdistcodename}-backports":
|
|
|
|
ensure => present,
|
|
|
|
package => '*',
|
|
|
|
pin => "release a=${::lsbdistcodename}-backports",
|
2012-09-20 20:56:10 +02:00
|
|
|
priority => $priority,
|
2012-09-20 20:54:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|