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>
This commit is contained in:
parent
5bf01f148d
commit
e22029433a
2 changed files with 9 additions and 14 deletions
|
@ -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'];
|
||||
}
|
||||
}
|
||||
|
|
@ -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'];
|
||||
|
|
Loading…
Reference in a new issue