summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp1
-rw-r--r--manifests/params.pp1
-rw-r--r--templates/Debian/sources.list.erb10
3 files changed, 8 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 68856cc..062be4c 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -7,6 +7,7 @@ class apt(
$codename = $apt::params::codename,
$use_lts = $apt::params::use_lts,
$use_volatile = $apt::params::use_volatile,
+ $use_backports = $apt::params::use_backports,
$include_src = $apt::params::include_src,
$use_next_release = $apt::params::use_next_release,
$debian_url = $apt::params::debian_url,
diff --git a/manifests/params.pp b/manifests/params.pp
index f977c27..a1c7392 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -2,6 +2,7 @@ class apt::params () {
$codename = $::lsbdistcodename
$use_lts = false
$use_volatile = false
+ $use_backports = true
$include_src = false
$use_next_release = false
$debian_url = 'http://httpredir.debian.org/debian/'
diff --git a/templates/Debian/sources.list.erb b/templates/Debian/sources.list.erb
index d043b70..a19893d 100644
--- a/templates/Debian/sources.list.erb
+++ b/templates/Debian/sources.list.erb
@@ -19,14 +19,16 @@ deb-src <%= security_url %> <%= codename %>/updates <%= lrepos %>
# There is no security support for <%= release %>
<% end -%>
+<% if use_volatile=scope.lookupvar('apt::use_backports') -%>
# backports
-<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
+<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
# There is no backports archive for <%= release %>
-<% else -%>
+<% else -%>
deb <%= backports_url=scope.lookupvar('apt::backports_url') %> <%= codename %>-backports <%= lrepos %>
-<% if include_src -%>
+<% if include_src -%>
deb-src <%= backports_url %> <%= codename %>-backports <%= lrepos %>
-<% end
+<% end
+ end
end -%>
<% if use_volatile=scope.lookupvar('apt::use_volatile') -%>