From ebcda455df36aefac48bb831192f2b4e7af8fafc Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 17 Oct 2010 20:36:45 -0400 Subject: Make $apt_clean effective in all cases The file "/etc/apt/apt.conf.d/from_puppet" is currently only defined when $custom_sources_list is not used (it is declared in default_preferences). Bring this file up in the apt class so that using custom sources doesn't remove its addition. Signed-off-by: Gabriel Filion --- manifests/default_preferences.pp | 4 ---- manifests/init.pp | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'manifests') diff --git a/manifests/default_preferences.pp b/manifests/default_preferences.pp index 3cdb355..4752fad 100644 --- a/manifests/default_preferences.pp +++ b/manifests/default_preferences.pp @@ -8,9 +8,5 @@ class apt::default_preferences { alias => apt_config, # only update together require => File["/etc/apt/sources.list"]; - # 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 => Config_file[apt_config]; } } diff --git a/manifests/init.pp b/manifests/init.pp index 98ec91c..9ef1cea 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -29,6 +29,13 @@ 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 => Config_file[apt_config]; + } + case $custom_preferences { '': { include apt::default_preferences -- cgit v1.2.3