aboutsummaryrefslogtreecommitdiff
path: root/manifests/preferences_snippet.pp
diff options
context:
space:
mode:
authorGabriel Filion <lelutin@gmail.com>2010-10-25 12:17:50 -0400
committerGabriel Filion <lelutin@gmail.com>2010-10-25 14:15:12 -0400
commit4ebb7d463ed6e85a715f0a311378bf673a907042 (patch)
treee5635c1b42e2e1f71643126c0c58a55db29adeee /manifests/preferences_snippet.pp
parent26714ae4d2992c85082ec37e6c40d725d097f79a (diff)
downloadpuppet-apt-4ebb7d463ed6e85a715f0a311378bf673a907042.tar.gz
puppet-apt-4ebb7d463ed6e85a715f0a311378bf673a907042.tar.bz2
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 <lelutin@gmail.com>
Diffstat (limited to 'manifests/preferences_snippet.pp')
-rw-r--r--manifests/preferences_snippet.pp4
1 files changed, 4 insertions, 0 deletions
diff --git a/manifests/preferences_snippet.pp b/manifests/preferences_snippet.pp
index a723206..9da7a8e 100644
--- a/manifests/preferences_snippet.pp
+++ b/manifests/preferences_snippet.pp
@@ -4,6 +4,10 @@ define apt::preferences_snippet(
$release,
$priority
){
+ if $custom_preferences == false {
+ fail("Trying to define a preferences_snippet with \$custom_preferences set to false.")
+ }
+
include apt::preferences
file { "${apt::preferences::apt_preferences_dir}/${name}":