From ac76a5d52df78aec919f08334ca5b140902a9298 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 24 Oct 2010 09:07:34 -0400 Subject: Add apt_conf_snippet and use it where possible With the new define, it's easy to add an apt.conf snippet in apt.conf.d It accepts either 'sources' to get a static file or 'content' to define content inline or with the help of a template. Put it to use where we create files in apt.conf.d Finally, fix the dependancy to the apt_config file (however, I don't see the need for this dependancy) Signed-off-by: Gabriel Filion --- manifests/init.pp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index 145bba6..0e4bd5c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -23,7 +23,8 @@ class apt { '': { config_file { # include main, security and backports - # additional sources could be included via an array + # additional sources should be included via the custom_sources_template + # define "/etc/apt/sources.list": content => template( "apt/$operatingsystem/sources.list.erb"), require => Package['lsb']; @@ -37,11 +38,17 @@ class apt { } } - config_file { - # little default settings which keep the system sane - "/etc/apt/apt.conf.d/from_puppet": - content => "APT::Get::Show-Upgraded true;\nDSelect::Clean $real_apt_clean;\n", - before => Concatenated_file['/etc/apt/preferences']; + # 01autoremove already present by default + apt_conf_snippet{ "02show_upgraded": + source => ["puppet:///modules/site-apt/${fqdn}/02show_upgraded", + "puppet:///modules/site-apt/02show_upgraded", + "puppet:///modules/apt/02show_upgraded"] + } + + apt_conf_snippet{ "03clean": + source => ["puppet:///modules/site-apt/${fqdn}/03clean", + "puppet:///modules/site-apt/03clean", + "puppet:///modules/apt/03clean"] } case $custom_preferences { -- cgit v1.2.3