aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp16
-rw-r--r--manifests/params.pp7
2 files changed, 19 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index fc93eb3..6732ade 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -46,11 +46,10 @@ class apt(
default => $custom_sources_list
}
file {
- # include main, security and backports
+ # include main and security
# additional sources should be included via the apt::sources_list define
'/etc/apt/sources.list':
content => $sources_content,
- require => Package['lsb'],
notify => Exec['refresh_apt'],
owner => root,
group => 0,
@@ -98,6 +97,19 @@ class apt(
# backports uses the normal archive key now
package { 'debian-backports-keyring': ensure => absent }
+ if ($use_backports and !($::debian_release in ['testing', 'unstable', 'experimental'])) {
+ apt::sources_list {
+ 'backports':
+ content => "deb $backports_url ${::debian_codename}-backports ${apt::real_repos}",
+ }
+ if $include_src {
+ apt::sources_list {
+ 'backports-src':
+ content => "deb-src $backports_url ${::debian_codename}-backports ${apt::real_repos}",
+ }
+ }
+ }
+
include common::moduledir
common::module_dir { 'apt': }
$apt_base_dir = "${common::moduledir::module_dir_path}/apt"
diff --git a/manifests/params.pp b/manifests/params.pp
index 9c85b6f..28da13e 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -6,13 +6,16 @@ class apt::params () {
$use_next_release = false
$debian_url = 'http://httpredir.debian.org/debian/'
$security_url = 'http://security.debian.org/'
+ $ubuntu_url = 'http://archive.ubuntu.com/ubuntu'
$backports_url = $::debian_codename ? {
'squeeze' => 'http://backports.debian.org/debian-backports/',
- default => $debian_url
+ default => $::operatingsystem ? {
+ 'Ubuntu' => $ubuntu_url,
+ default => $debian_url,
+ }
}
$lts_url = $debian_url
$volatile_url = 'http://volatile.debian.org/debian-volatile/'
- $ubuntu_url = 'http://archive.ubuntu.com/ubuntu'
$repos = 'auto'
$custom_preferences = ''
$disable_update = false