'comment' => $comment,
'includes' => $includes,
'options' => delete_undef_values({
- 'arch' => $architecture,
+ 'arch' => $_architecture,
'trusted' => $allow_unsigned ? { true => 'yes', false => undef },
'allow-insecure' => $allow_insecure ? { true => 'yes', false => undef },
'signed-by' => $keyring,
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.
#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
#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
id: 'Debian',
},
},
- 'apt::apt_update_last_success': factval,
+ 'apt_update_last_success': factval,
}
end
let(:pre_condition) do
id: 'Debian',
},
},
- 'apt::apt_update_last_success': Time.now.to_i,
+ 'apt_update_last_success': Time.now.to_i,
}
end
let(:pre_condition) do
id: 'Debian',
},
},
- 'apt::apt_update_last_success': factval,
+ 'apt_update_last_success': factval,
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => 'reluctantly' },}" }
id: 'Debian',
},
},
- 'apt::apt_update_last_success': factval,
+ 'apt_update_last_success': factval,
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
id: 'Debian',
},
},
- '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}',} }" }
id: 'Debian',
},
},
- 'apt::apt_update_last_success': nil,
+ 'apt_update_last_success': nil,
}
end
let(:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }