summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornadir <nadir-technik@nadir.org>2009-12-13 15:14:39 +0100
committernadir <nadir-technik@nadir.org>2009-12-13 15:14:39 +0100
commit0c86627838c5cafbc4f6c5ecfaf389a90e0dcc20 (patch)
treea5a23b6642f6c24cd142b61b348b8112e4a7e7e2
parent1c491fecdaa31b0729de4cbcfac431829851b989 (diff)
added $apt_volatile_enabled, updated README
-rw-r--r--README7
-rw-r--r--manifests/init.pp17
-rw-r--r--templates/sources.list.volatile.erb7
3 files changed, 29 insertions, 2 deletions
diff --git a/README b/README
index 72afcfc..60c16a0 100644
--- a/README
+++ b/README
@@ -75,13 +75,18 @@ exist there, this module will apt-key add each key
$backports_enabled
------------------
If set to true, the debian backports repository is enabled through a
-file in /etc/apt/sources.d/. Defaults to false.
+file in /etc/apt/sources.d/. Defaults to true.
$apt_deb_src_enabled
--------------------
If set to true, the debian sources repository is enabled through a
file in /etc/apt/sources.d/. Defaults to false.
+$apt_volatile_enabled
+--------------------
+If set to true, the debiani volatile repository is enabled through a
+file in /etc/apt/sources.d/. Defaults to false.
+
Classes
=======
diff --git a/manifests/init.pp b/manifests/init.pp
index 11f627b..4606a94 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -21,6 +21,11 @@ class apt {
'true' => 'true',
default => $apt_deb_src_enabled,
}
+
+ $apt_volatile_enabled = $apt_volatile_enabled ? {
+ 'true' => 'true',
+ default => $apt_volatile_enabled,
+ }
package { apt: ensure => installed }
@@ -159,7 +164,6 @@ class apt {
case $apt_deb_src_enabled {
'true': {
config_file {
- # deb-src
"/etc/apt/sources.list.d/debian-sources.list":
content => template("apt/sources.list.deb-src.erb"),
require => Exec[assert_lsbdistcodename];
@@ -168,6 +172,17 @@ class apt {
default: {}
}
+ case $apt_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: {}
+ }
+
case $custom_key_dir {
'': {
exec { "/bin/true # no_custom_keydir": }
diff --git a/templates/sources.list.volatile.erb b/templates/sources.list.volatile.erb
new file mode 100644
index 0000000..06d6590
--- /dev/null
+++ b/templates/sources.list.volatile.erb
@@ -0,0 +1,7 @@
+# This file is brought to you by puppet
+
+<% if (lsbdistcodename == "sid" || lsbdistcodename == "unstable" || lsbdistcodename == "squeeze") -%>
+# There are no backports for for <%= lsbdistcodename %>
+<% else -%>
+deb http://volatile.debian.org/debian-volatile <%= lsbdistcodename %>/volatile main contrib non-free
+<% end -%>