d97a49b7b2
Simplifications: make apt_conf_snippet repeat less code, make code that generates sources.list more concise. Remove all inline content in favor of templates and static files. The ability to include sources for static files was needed for the main 'preferences' file, so it was added to the preferences_snippet define. Signed-off-by: Gabriel Filion <lelutin@gmail.com>
22 lines
762 B
Puppet
22 lines
762 B
Puppet
class apt::preferences {
|
|
|
|
include common::moduledir
|
|
$apt_preferences_dir = "${common::moduledir::module_dir_path}/apt/preferences"
|
|
module_dir{'apt/preferences': }
|
|
file{"${apt_preferences_dir}_header":
|
|
source => ["puppet:///modules/site-apt/${fqdn}/preferences",
|
|
"puppet:///modules/site-apt/preferences",
|
|
"puppet:///modules/apt/preferences"]
|
|
}
|
|
|
|
concatenated_file{'/etc/apt/preferences':
|
|
dir => $apt_preferences_dir,
|
|
header => "${apt_preferences_dir}_header",
|
|
# use Concatenated_file[apt_config] to reference a completed configuration
|
|
# See "The Puppet Semaphor" 2007-06-25 on the puppet-users ML
|
|
alias => apt_config,
|
|
# only update together
|
|
require => File["/etc/apt/sources.list"];
|
|
}
|
|
|
|
}
|