X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fupdate.pp;h=a9f2486b16bf87e9ad3f1f9143936a8ab45cdee3;hb=refs%2Fheads%2Fpdksync_CONT-844-update_.sync.yml;hp=ef37f52db04f1bfa19da690bb054b51c6cbda897;hpb=65e03244552e8113b69f6ca5f4e6dc142251df0b;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/update.pp b/manifests/update.pp index ef37f52..a9f2486 100644 --- a/manifests/update.pp +++ b/manifests/update.pp @@ -5,7 +5,7 @@ class apt::update { assert_private() - #TODO: to catch if $apt_update_last_success has the value of -1 here. If we + #TODO: to catch if apt_update_last_success has the value of -1 here. If we #opt to do this, a info/warn would likely be all you'd need likely to happen #on the first run, but if it's not run in awhile something is likely borked #with apt and we'd want to know about it. @@ -18,8 +18,8 @@ class apt::update { #compare current date with the apt_update_last_success fact to determine #if we should kick apt_update. $daily_threshold = (Integer(Timestamp().strftime('%s')) - 86400) - if $apt::apt_update_last_success { - if $apt::apt_update_last_success + 0 < $daily_threshold { + if $facts['apt_update_last_success'] { + if $facts['apt_update_last_success'] + 0 < $daily_threshold { $_kick_apt = true } else { $_kick_apt = false @@ -33,8 +33,8 @@ class apt::update { #compare current date with the apt_update_last_success fact to determine #if we should kick apt_update. $weekly_threshold = (Integer(Timestamp().strftime('%s')) - 604800) - if $apt::apt_update_last_success { - if ( $apt::apt_update_last_success + 0 < $weekly_threshold ) { + if $facts['apt_update_last_success'] { + if $facts['apt_update_last_success'] + 0 < $weekly_threshold { $_kick_apt = true } else { $_kick_apt = false