fail('This module only works on Debian or derivatives like Ubuntu')
}
- $frequency_options = ['always','daily','weekly','reluctantly']
-
if $update['frequency'] {
- validate_re($update['frequency'], $frequency_options)
+ assert_type(
+ Enum['always','daily','weekly','reluctantly'],
+ $update['frequency'],
+ )
}
if $update['timeout'] {
assert_type(Integer, $update['timeout'])
$_purge = merge($::apt::purge_defaults, $purge)
if $proxy['ensure'] {
- validate_re($proxy['ensure'], ['file', 'present', 'absent'])
+ assert_type(Enum['file', 'present', 'absent'], $proxy['ensure'])
}
if $proxy['host'] {
assert_type(String, $proxy['host'])
# required for adding GPG keys on Debian 9 (and derivatives)
case $facts['os']['name'] {
'Debian': {
- if versioncmp($facts['os']['release']['full'], '9.0') >= 0 {
+ if versioncmp($facts['os']['release']['major'], '9') >= 0 {
ensure_packages(['dirmngr'])
}
}