Merge pull request #496 from puppetlabs/allow-undef-content-conf
[puppet-modules/puppetlabs-apt.git] / manifests / init.pp
index dbf03329586177846ddf5c0bdad09663eefff347..140e171c50b008cb8f57d8596cfe77ca8f958476 100644 (file)
@@ -14,9 +14,6 @@ class apt(
   if $update['frequency'] {
     validate_re($update['frequency'], $frequency_options)
   }
-  if $update['always'] {
-    validate_bool($update['always'])
-  }
   if $update['timeout'] {
     unless is_integer($update['timeout']) {
       fail('timeout value for update must be an integer')
@@ -84,7 +81,7 @@ class apt(
     true  => absent,
   }
 
-  if $_update['always'] {
+  if $_update['frequency'] == 'always' {
     Exec <| title=='apt_update' |> {
       refreshonly => false,
     }
@@ -136,10 +133,7 @@ class apt(
     notify  => Exec['apt_update'],
   }
 
-  # Need anchor to provide containment for dependencies.
-  anchor { 'apt::update':
-    require => Class['apt::update'],
-  }
+  contain 'apt::update'
 
   # manage sources if present
   if $sources {