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/default_sources_list.pp | 11 ----------- manifests/init.pp | 12 +++++++++--- 2 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 manifests/default_sources_list.pp (limited to 'manifests') 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']; -- cgit v1.2.3