diff options
author | root <root@puppetmaster.uni-ak.ac.at> | 2007-09-14 08:16:33 +0200 |
---|---|---|
committer | David Schmitt <david@schmitt.edv-bus.at> | 2007-09-14 10:24:24 +0200 |
commit | bb6bdb7701f88172e94fceed2c7d7c3ded9fbadd (patch) | |
tree | 237400491b8efd8ed3103adf1875ed06d623b5b1 /manifests | |
parent | 5e254ad2985fa7c5a514e9b4d590aefe8ce22c13 (diff) |
add $custom_sources_list to override sources.list contents
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 26 |
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"), |