X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=lib%2Fpuppet%2Ftype%2Fapt_key.rb;h=c78ba8fb438538eb4a0034f335b617fd2c50f6e9;hb=3d3620ccd767ca8c4055f1c84a658c79de31fcb3;hp=467f568af4a74ff475fb2ed77da0e2c31298dc16;hpb=4a90396df778dae89988221187d767d6c940159f;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/lib/puppet/type/apt_key.rb b/lib/puppet/type/apt_key.rb index 467f568..c78ba8f 100644 --- a/lib/puppet/type/apt_key.rb +++ b/lib/puppet/type/apt_key.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pathname' require 'puppet/parameter/boolean' @@ -68,7 +70,7 @@ Puppet::Type.newtype(:apt_key) do 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' - newvalues(%r{\A((hkp|hkps|http|https)://)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?$}) + newvalues(%r{\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_.]+)*\/?$}) end newparam(:options) do @@ -80,6 +82,11 @@ Puppet::Type.newtype(:apt_key) do defaultto false end + newparam(:weak_ssl, boolean: true, parent: Puppet::Parameter::Boolean) do + desc 'When true and source uses https, accepts download of keys without SSL verification' + defaultto false + end + newproperty(:fingerprint) do desc <<-MANIFEST The 40-digit hexadecimal fingerprint of the specified GPG key.