aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-10-06 12:39:50 +0200
committerintrigeri <intrigeri@boum.org>2010-10-06 12:39:50 +0200
commit53ca6e2235accc2903d42d8aaffa1b3dd7c1130f (patch)
tree04657c3753c5df5f4d9e61c6b6407f9d857a9f17
parent1183a04b4867dbd7480cd4898553c8f7f1c7688d (diff)
downloadpuppet-apt-53ca6e2235accc2903d42d8aaffa1b3dd7c1130f.tar.gz
puppet-apt-53ca6e2235accc2903d42d8aaffa1b3dd7c1130f.tar.bz2
Add opt-in support for next Debian release sources.
-rw-r--r--README9
-rw-r--r--manifests/init.pp5
-rw-r--r--templates/sources.list.erb41
3 files changed, 55 insertions, 0 deletions
diff --git a/README b/README
index f39007b..1a0fd3c 100644
--- a/README
+++ b/README
@@ -92,6 +92,15 @@ added binary archive source.
By default this is false for backward compatibility with older
versions of this module.
+$apt_use_next_release
+---------------------
+
+If this variable is set to true the sources for the next Debian
+release are added. The default pinning configuration pins it to very
+low values.
+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 7f52a9c..095fe79 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -21,6 +21,11 @@ class apt {
default => $apt_include_src,
}
+ $use_next_release = $apt_use_next_release ? {
+ '' => false,
+ default => $apt_use_next_release,
+ }
+
package { apt:
ensure => installed,
require => undef,
diff --git a/templates/sources.list.erb b/templates/sources.list.erb
index 35fac32..43f4a56 100644
--- a/templates/sources.list.erb
+++ b/templates/sources.list.erb
@@ -40,3 +40,44 @@ deb-src http://volatile.debian.org/debian-volatile/ <%= codename %>/volatile <%=
<% end %>
<% end %>
+<% if use_next_release then %>
+### Debian next: <%= next_codename %>
+
+# basic
+deb <%= http://ftp.debian.org/debian/ %> <%= next_codename %> <%= repos %>
+<% if include_src then %>
+deb-src <%= http://ftp.debian.org/debian/ %> <%= next_codename %> <%= repos %>
+<% end %>
+
+# security
+<% if (next_release == "unstable" || next_release == "experimental") %>
+# There is no security support for <%= next_release %>
+<% else %>
+deb http://security.debian.org/ <%= next_codename %>/updates <%= repos %>
+<% if include_src then %>
+deb-src http://security.debian.org/ <%= next_codename %>/updates <%= repos %>
+<% end %>
+<% end %>
+
+# backports
+<% if (next_release == "testing" || next_release == "unstable" || next_release == "experimental") %>
+# There is no backports archive for <%= next_release %>
+<% else %>
+deb http://backports.debian.org/debian-backports/ <%= next_codename %>-backports <%= repos %>
+<% if include_src then %>
+deb-src http://backports.debian.org/debian-backports/ <%= next_codename %>-backports <%= repos %>
+<% end %>
+<% end %>
+
+<% if use_volatile %>
+# volatile
+<% if (next_release == "testing" || next_release == "unstable" || next_release == "experimental") %>
+# There is no volatile archive for <%= next_release %>
+<% else %>
+deb http://volatile.debian.org/debian-volatile/ <%= next_codename %>/volatile <%= repos %>
+<% if include_src then %>
+deb-src http://volatile.debian.org/debian-volatile/ <%= next_codename %>/volatile <%= repos %>
+<% end %>
+<% end %>
+<% end %>
+<% end %>