From 4ebb7d463ed6e85a715f0a311378bf673a907042 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Mon, 25 Oct 2010 12:17:50 -0400 Subject: Fix apt::preferences::absent Currently, setting the $custom_preferences variable to false fails because of the /etc/apt/preferences concatenated_file being re-defined. Fix this by setting dependencies on the resource only when we expect to create the /etc/apt/preferences file. Also, since there is no "ensure" parameter to concatenated_file, use a simple file resource to ensure that it is removed. Signed-off-by: Gabriel Filion --- manifests/init.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index 8588932..dde9c29 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -96,7 +96,11 @@ class apt { alias => "custom_keys", subscribe => File["${apt_base_dir}/keys.d"], refreshonly => true, - before => Concatenated_file[apt_config]; + } + if $custom_preferences != false { + Exec["custom_keys"] { + before => Concatenated_file[apt_config], + } } } -- cgit v1.2.3