aboutsummaryrefslogtreecommitdiff
path: root/manifests/unattended_upgrades.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-14 16:17:39 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-14 16:17:39 -0300
commitee15eb570d941ac4113bfad37a539a7e3636f8d2 (patch)
treeaab424c5399331d6401f0afbf41234a1cb24abeb /manifests/unattended_upgrades.pp
parentae6cb44e1ad3498ed7427df3dc46369596faf983 (diff)
downloadpuppet-apt-ee15eb570d941ac4113bfad37a539a7e3636f8d2.tar.gz
puppet-apt-ee15eb570d941ac4113bfad37a539a7e3636f8d2.tar.bz2
Avoid variable lookup on apt::unattended_upgrades
The current lookup for '::apt::custom_preferences' might lead to a lookup error like (Scope(Class[Apt::Unattended_upgrades])) Could not look up qualified variable '::apt::custom_preferences'; class ::apt has not been evaluated at /etc/puppet/modules/apt/manifests/unattended_upgrades.pp:17 Since the lookup apparently happens during compilation time, this commits tries to fix this issue by using a define() function call instead of the lookup.
Diffstat (limited to 'manifests/unattended_upgrades.pp')
-rw-r--r--manifests/unattended_upgrades.pp2
1 files changed, 1 insertions, 1 deletions
diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp
index 4df9b8a..2a6fe9e 100644
--- a/manifests/unattended_upgrades.pp
+++ b/manifests/unattended_upgrades.pp
@@ -14,7 +14,7 @@ class apt::unattended_upgrades {
require => Package['unattended-upgrades'],
}
- if $::apt::custom_preferences != false {
+ if defined(File['apt_config']) {
Apt_conf['50unattended-upgrades'] {
before => File['apt_config'],
}