X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Finit.pp;h=319e0649cd74fc0695f13afc8119804f289db7fb;hb=90f5fdbce44d5fe61a70fb2129e01785e95c3218;hp=44e66ce51ff2dd00980603ae05423c11d092cae3;hpb=c9800015fa342b9ceb7ef1a0eae27e9c481dcde8;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/init.pp b/manifests/init.pp index 44e66ce..319e064 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -35,10 +35,11 @@ class apt ( 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']) @@ -66,7 +67,7 @@ class apt ( $_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'])