From: intrigeri Date: Wed, 6 Oct 2010 10:00:32 +0000 (+0200) Subject: Add opt-in support for Debian Volatile. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=de94b807ee9495d63d1afe16579bd435826e20f0;p=puppet-apt.git Add opt-in support for Debian Volatile. --- diff --git a/README b/README index 131ae1d..22de451 100644 --- a/README +++ b/README @@ -76,6 +76,13 @@ If this variable is set to true apt::unattended_upgrades is included, which will install the package unattended-upgrades and configure it to daily upgrade the system. +$apt_use_volatile +----------------- + +If this variable is set to true the Debian Volatile sources are added. +By default this is false for backward compatibility with older +versions of this module. + Classes ======= diff --git a/manifests/init.pp b/manifests/init.pp index a211006..d79e79a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -16,6 +16,11 @@ class apt { require => undef, } + $use_volatile = $apt_use_volatile ? { + '' => false, + default => $apt_use_volatile, + } + # init $release, $next_release, $codename, $next_codename case $lsbdistcodename { '': { diff --git a/templates/sources.list.erb b/templates/sources.list.erb index 989d98d..d3739ff 100644 --- a/templates/sources.list.erb +++ b/templates/sources.list.erb @@ -19,3 +19,12 @@ deb http://security.debian.org/ <%= codename %>/updates <%= repos %> deb http://backports.debian.org/debian-backports/ <%= codename %>-backports <%= repos %> <% end %> +<% if use_volatile %> +# volatile +<% if (release == "testing" || release == "unstable" || release == "experimental") %> +# There is no volatile archive for <%= release %> +<% else %> +deb http://volatile.debian.org/debian-volatile/ <%= codename %>/volatile <%= repos %> +<% end %> +<% end %> +