(MODULES-3581) modulesync [067d08a]
[puppet-modules/puppetlabs-apt.git] / manifests / setting.pp
index bc0e15a8d52099d969c52257afb19aae2f819781..b0fb62b1debd8fb5d90c1f86cb0f0bdc5e778a7f 100644 (file)
@@ -6,6 +6,7 @@ define apt::setting (
   $notify_update = true,
 ) {
 
+  include 'apt::params'
   if $content and $source {
     fail('apt::setting cannot have both content and source')
   }
@@ -36,17 +37,17 @@ define apt::setting (
     validate_string($content)
   }
 
-  if $setting_type == 'list' {
+  if ($setting_type == 'list') or ($setting_type == 'pref') {
     $_priority = ''
   } else {
     $_priority = $priority
   }
 
-  $_path = $::apt::config_files[$setting_type]['path']
-  $_ext  = $::apt::config_files[$setting_type]['ext']
+  $_path = $::apt::params::config_files[$setting_type]['path']
+  $_ext  = $::apt::params::config_files[$setting_type]['ext']
 
   if $notify_update {
-    $_notify = Exec['apt_update']
+    $_notify = Class['apt::update']
   } else {
     $_notify = undef
   }
@@ -60,10 +61,4 @@ define apt::setting (
     source  => $source,
     notify  => $_notify,
   }
-
-  if $notify_update {
-    anchor { "apt::setting::${name}":
-      require => Class['apt::update']
-    }
-  }
 }