aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-08-15 21:21:32 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-08-15 21:21:32 -0300
commit98b043bdab72b66276cb3bba0784579d6bfbd4a6 (patch)
treec50dfcd88143bfda4573e74463a3d91f515f29e0
parent284acf0b93e45946d41a200868a5ddce1a1530e0 (diff)
downloadpuppet-apt-98b043bdab72b66276cb3bba0784579d6bfbd4a6.tar.gz
puppet-apt-98b043bdab72b66276cb3bba0784579d6bfbd4a6.tar.bz2
Adding support for debian volatile
-rw-r--r--manifests/init.pp14
-rw-r--r--templates/sources.list.volatile.erb8
2 files changed, 22 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 028d828..ae645c6 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -123,6 +123,20 @@ class apt {
ensure => latest,
}
+ case $volatile_enabled {
+ true: {
+ config_file { "/etc/apt/sources.list.d/debian-volatile.list":
+ content => template("apt/sources.list.volatile.erb"),
+ require => Exec[assert_lsbdistcodename];
+ }
+ }
+ default: {
+ config_file { "/etc/apt/sources.list.d/debian-volatile.list":
+ ensure => absent,
+ }
+ }
+ }
+
case $backports_enabled {
true: {
config_file {
diff --git a/templates/sources.list.volatile.erb b/templates/sources.list.volatile.erb
new file mode 100644
index 0000000..cc9316b
--- /dev/null
+++ b/templates/sources.list.volatile.erb
@@ -0,0 +1,8 @@
+# This file is brought to you by puppet
+
+# backports
+<% if (lsbdistcodename == "sid" || lsbdistcodename == "unstable") -%>
+# There are no backports for for <%= lsbdistcodename %>
+<% else -%>
+deb http://volatile.debian.org/debian-volatile <%= lsbdistcodename %>/volatile main contrib non-free
+<% end -%>