summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2015-10-03 01:13:50 -0400
committerGabriel Filion <gabster@lelutin.ca>2016-06-27 15:39:51 +0200
commit770f8fb5dafa442bc018fa95fcab2fb60d817020 (patch)
tree8f8ed54a10c2e0ee2392ff38bb6b8b2741a2e44c /manifests/init.pp
parent8c8bd7bb1e5cc0f5297db9629ece783452233d1f (diff)
make backports_url follow debian_url by default
backports_url was already set to the same value than debian_url by default, but it was set to the default value of debian_url. this meant that when giving a url to the debian_url parameter to the apt class, the backports_url would not follow and would still be using the default value for debian_url. with this change, when backports_url is not specified, but debian_url is, then both of them take on the value given to the debian_url. of course if backports_url is also given a value, then it keeps the value given by the user.
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp9
1 files changed, 7 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 4c44af2..9c186cc 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -35,6 +35,11 @@ class apt(
}
}
+ $real_backports_url = $backports_url ? {
+ false => $debian_url,
+ default => $backports_url,
+ }
+
package { 'apt':
ensure => installed,
require => undef,
@@ -99,12 +104,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}",
}
}
}