move backports to snippets
this allows for third party modules to enable this on the fly
This commit is contained in:
parent
bfa973a668
commit
e4a9222d86
3 changed files with 16 additions and 21 deletions
|
@ -46,7 +46,7 @@ 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,
|
||||
|
@ -98,6 +98,21 @@ class apt(
|
|||
# backports uses the normal archive key now
|
||||
package { 'debian-backports-keyring': ensure => absent }
|
||||
|
||||
if $use_backports {
|
||||
if ($release != "testing" and $release != "unstable" and $release != "experimental") {
|
||||
apt::sources_list {
|
||||
"${codename}-backports":
|
||||
content => "deb $backports_url ${codename}-backports ${apt::real_repos}",
|
||||
}
|
||||
if $include_src {
|
||||
apt::sources_list {
|
||||
"${codename}-backports-src":
|
||||
content => "deb-src $backports_url ${codename}-backports ${apt::real_repos}",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include common::moduledir
|
||||
common::module_dir { 'apt': }
|
||||
$apt_base_dir = "${common::moduledir::module_dir_path}/apt"
|
||||
|
|
|
@ -19,18 +19,6 @@ deb-src <%= security_url %> <%= codename %>/updates <%= lrepos %>
|
|||
# There is no security support for <%= release %>
|
||||
<% end -%>
|
||||
|
||||
<% if use_backports=scope.lookupvar('apt::use_backports') -%>
|
||||
# backports
|
||||
<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
|
||||
# There is no backports archive for <%= release %>
|
||||
<% else -%>
|
||||
deb <%= backports_url=scope.lookupvar('apt::backports_url') %> <%= codename %>-backports <%= lrepos %>
|
||||
<% if include_src -%>
|
||||
deb-src <%= backports_url %> <%= codename %>-backports <%= lrepos %>
|
||||
<% end
|
||||
end
|
||||
end -%>
|
||||
|
||||
<% if use_volatile=scope.lookupvar('apt::use_volatile') -%>
|
||||
# volatile
|
||||
<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
|
||||
|
|
|
@ -20,11 +20,3 @@ deb <%= ubuntu_url %> <%= codename %>-security <%= lrepos %>
|
|||
<% if include_src -%>
|
||||
deb-src <%= ubuntu_url %> <%= codename %>-security <%= lrepos %>
|
||||
<% end -%>
|
||||
|
||||
<% if use_backports=scope.lookupvar('apt::use_backports') -%>
|
||||
# backports
|
||||
deb <%= ubuntu_url %> <%= codename %>-backports <%= lrepos %>
|
||||
<% if include_src -%>
|
||||
deb-src <%= ubuntu_url %> <%= codename %>-backports <%= lrepos %>
|
||||
<% end
|
||||
end -%>
|
||||
|
|
Loading…
Reference in a new issue