summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorroot <root@puppetmaster.uni-ak.ac.at>2007-09-14 08:16:33 +0200
committerDavid Schmitt <david@schmitt.edv-bus.at>2007-09-14 10:24:24 +0200
commitbb6bdb7701f88172e94fceed2c7d7c3ded9fbadd (patch)
tree237400491b8efd8ed3103adf1875ed06d623b5b1 /manifests
parent5e254ad2985fa7c5a514e9b4d590aefe8ce22c13 (diff)
add $custom_sources_list to override sources.list contents
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp26
1 files changed, 21 insertions, 5 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 6f34cd1..161a5da 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -21,12 +21,28 @@ class apt {
# a few templates need lsbdistcodename
include assert_lsbdistcodename
+ case $custom_sources_list {
+ '': {
+ include default_sources_list
+ }
+ default: {
+ config_file { "/etc/apt/sources.list":
+ content => $custom_sources_list
+ }
+ }
+ }
+
+ class default_sources_list {
+ config_file {
+ # include main, security and backports
+ # additional sources could be included via an array
+ "/etc/apt/sources.list":
+ content => template("apt/sources.list.erb"),
+ require => Exec[assert_lsbdistcodename];
+ }
+ }
+
config_file {
- # include main, security and backports
- # additional sources could be included via an array
- "/etc/apt/sources.list":
- content => template("apt/sources.list.erb"),
- require => Exec[assert_lsbdistcodename];
# this just pins unstable and testing to very low values
"/etc/apt/preferences":
content => template("apt/preferences.erb"),