From 0c86627838c5cafbc4f6c5ecfaf389a90e0dcc20 Mon Sep 17 00:00:00 2001 From: nadir Date: Sun, 13 Dec 2009 15:14:39 +0100 Subject: added $apt_volatile_enabled, updated README --- README | 7 ++++++- manifests/init.pp | 17 ++++++++++++++++- templates/sources.list.volatile.erb | 7 +++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 templates/sources.list.volatile.erb 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 -%> -- cgit v1.2.3