X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Finit.pp;h=ded13f2fc46b3bf04f72b422d3338e9bdf357cf8;hb=f1fe05ec2b73ba5dd8466f85fa40e61a29586f8c;hp=dbf03329586177846ddf5c0bdad09663eefff347;hpb=396036892d81a10afb59a0cea287e620a60f7555;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/init.pp b/manifests/init.pp index dbf0332..ded13f2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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') @@ -75,16 +72,16 @@ class apt( } $sources_list_content = $_purge['sources.list'] ? { - false => undef, - true => "# Repos managed by puppet.\n", + true => "# Repos managed by puppet.\n", + default => undef, } $preferences_ensure = $_purge['preferences'] ? { - false => file, - true => absent, + true => absent, + default => file, } - 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'], - } + anchor { 'apt_first': } -> Class['apt::update'] -> anchor { 'apt_last': } # manage sources if present if $sources {