summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
527d095)
class apt::update {
assert_private()
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.
#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.
#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)
#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
$_kick_apt = true
} else {
$_kick_apt = false
#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)
#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
$_kick_apt = true
} else {
$_kick_apt = false
- 'apt::apt_update_last_success': factval,
+ 'apt_update_last_success': factval,
}
end
let(:pre_condition) do
}
end
let(:pre_condition) do
- 'apt::apt_update_last_success': Time.now.to_i,
+ 'apt_update_last_success': Time.now.to_i,
}
end
let(:pre_condition) do
}
end
let(:pre_condition) do
- 'apt::apt_update_last_success': factval,
+ 'apt_update_last_success': factval,
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => 'reluctantly' },}" }
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => 'reluctantly' },}" }
- 'apt::apt_update_last_success': factval,
+ 'apt_update_last_success': factval,
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
- 'apt::apt_update_last_success': Time.now.to_i,
+ 'apt_update_last_success': Time.now.to_i,
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
- 'apt::apt_update_last_success': nil,
+ 'apt_update_last_success': nil,
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }