From e22029433aa82817fb4cfcb9281991b5bd526c09 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 24 Oct 2010 07:32:14 -0400 Subject: 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 --- manifests/init.pp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'manifests/init.pp') 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']; -- cgit v1.2.3