X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=lib%2Fpuppet%2Ftype%2Fapt_key.rb;h=f55247314cc6f650bab39dd13735bcdda3b9dc3e;hb=87f3f1023cad452937d3b4c0bad84c69b442ffa1;hp=fa7b0c676c77e2c4c1d48eeaa37a1cd677a27076;hpb=fd3e07e58fadc6efb25d524168575c39de0c5590;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/lib/puppet/type/apt_key.rb b/lib/puppet/type/apt_key.rb index fa7b0c6..f552473 100644 --- a/lib/puppet/type/apt_key.rb +++ b/lib/puppet/type/apt_key.rb @@ -36,11 +36,7 @@ Puppet::Type.newtype(:apt_key) do else id = value.upcase end - if id.length == 16 - id[8..-1] - else - id - end + id end end @@ -60,10 +56,10 @@ Puppet::Type.newtype(:apt_key) do end newparam(:server) do - desc 'The key server to fetch the key from based on the ID.' + desc 'The key server to fetch the key from based on the ID. It can either be a domain name or url.' defaultto :'keyserver.ubuntu.com' - # Need to validate this, preferably through stdlib is_fqdn - # but still working on getting to that. + + newvalues(/\A((hkp|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,4})?$/) end newparam(:keyserver_options) do