summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp21
-rw-r--r--manifests/params.pp17
2 files changed, 18 insertions, 20 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 4c44af2..46e5cb0 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -20,19 +20,10 @@ class apt(
$custom_sources_list = '',
$custom_key_dir = $apt::params::custom_key_dir
) inherits apt::params {
- case $::operatingsystem {
- 'debian': {
- $real_repos = $repos ? {
- 'auto' => 'main contrib non-free',
- default => $repos,
- }
- }
- 'ubuntu': {
- $real_repos = $repos ? {
- 'auto' => 'main restricted universe multiverse',
- default => $repos,
- }
- }
+
+ $real_backports_url = $backports_url ? {
+ false => $debian_url,
+ default => $backports_url,
}
package { 'apt':
@@ -99,12 +90,12 @@ class apt(
if ($use_backports and !($::debian_release in ['testing', 'unstable', 'experimental'])) {
apt::sources_list {
'backports':
- content => "deb $backports_url ${::debian_codename}-backports ${apt::real_repos}",
+ content => "deb ${real_backports_url} ${::debian_codename}-backports ${apt::repos}",
}
if $include_src {
apt::sources_list {
'backports-src':
- content => "deb-src $backports_url ${::debian_codename}-backports ${apt::real_repos}",
+ content => "deb-src ${real_backports_url} ${::debian_codename}-backports ${apt::repos}",
}
}
}
diff --git a/manifests/params.pp b/manifests/params.pp
index 28af06e..a70dac1 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -9,14 +9,21 @@ class apt::params () {
$ubuntu_url = 'http://archive.ubuntu.com/ubuntu'
$backports_url = $::debian_codename ? {
'squeeze' => 'http://backports.debian.org/debian-backports/',
- default => $::operatingsystem ? {
- 'Ubuntu' => $ubuntu_url,
- default => $debian_url,
- }
+ default => false,
}
$lts_url = $debian_url
$volatile_url = 'http://volatile.debian.org/debian-volatile/'
- $repos = 'auto'
+ case $::operatingsystem {
+ 'debian': {
+ $repos = 'main contrib non-free'
+ }
+ 'ubuntu': {
+ $repos = 'main restricted universe multiverse'
+ }
+ default: {
+ fail("Unsupported system '${::operatingsystem}'.")
+ }
+ }
$custom_preferences = ''
$custom_key_dir = false
}