aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Filion <lelutin@gmail.com>2010-10-24 07:32:14 -0400
committerGabriel Filion <lelutin@gmail.com>2010-10-24 07:37:29 -0400
commite22029433aa82817fb4cfcb9281991b5bd526c09 (patch)
tree9ddb5bac49b4fec3f39ce6d304f88da6dc661828
parent5bf01f148d2c2db8523febc0d73591444c5965c9 (diff)
downloadpuppet-apt-e22029433aa82817fb4cfcb9281991b5bd526c09.tar.gz
puppet-apt-e22029433aa82817fb4cfcb9281991b5bd526c09.tar.bz2
Move default_sources_list into apt class
The contents of the file default_sources_list.pp is used in only one place. Remove the file and move its contents inside the apt class in order to have one less useless depth level. Signed-off-by: Gabriel Filion <lelutin@gmail.com>
-rw-r--r--manifests/default_sources_list.pp11
-rw-r--r--manifests/init.pp12
2 files changed, 9 insertions, 14 deletions
diff --git a/manifests/default_sources_list.pp b/manifests/default_sources_list.pp
deleted file mode 100644
index cf7d523..0000000
--- a/manifests/default_sources_list.pp
+++ /dev/null
@@ -1,11 +0,0 @@
-class apt::default_sources_list {
- include lsb
- config_file {
- # include main, security and backports
- # additional sources could be included via an array
- "/etc/apt/sources.list":
- content => template( "apt/$operatingsystem/sources.list.erb"),
- require => Package['lsb'];
- }
-}
-
diff --git a/manifests/init.pp b/manifests/init.pp
index 1011e65..145bba6 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -6,7 +6,7 @@
class apt {
import "custom_sources.pp"
-
+
# See README
$real_apt_clean = $apt_clean ? {
'' => 'auto',
@@ -18,12 +18,18 @@ class apt {
require => undef,
}
+ include lsb
case $custom_sources_list {
'': {
- include apt::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/$operatingsystem/sources.list.erb"),
+ require => Package['lsb'];
+ }
}
default: {
- include lsb
config_file { "/etc/apt/sources.list":
content => $custom_sources_list,
require => Package['lsb'];