X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fkey.pp;h=ce5fc2514cee6c27d32be04cd0cdaf3f47dac359;hb=0f8152536724a29441923c1cb82282e8fa2951dc;hp=231992b30ca5386c30c722a4fccaf28aa7044ec8;hpb=1a3d6625f477345e9eb71ad2e9c1bb9682ac692b;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/key.pp b/manifests/key.pp index 231992b..ce5fc25 100644 --- a/manifests/key.pp +++ b/manifests/key.pp @@ -10,9 +10,11 @@ # [*key*] # _default_: +$title+, the title/name of the resource # -# Is a GPG key ID. This key ID is validated with a regex enforcing it -# to only contain valid hexadecimal characters, be precisely 8 or 16 -# characters long and optionally prefixed with 0x. +# Is a GPG key ID or full key fingerprint. This value is validated with +# a regex enforcing it to only contain valid hexadecimal characters, be +# precisely 8 or 16 hexadecimal characters long and optionally prefixed +# with 0x for key IDs, or 40 hexadecimal characters long for key +# fingerprints. # # [*ensure*] # _default_: +present+ @@ -57,7 +59,7 @@ define apt::key ( $key_options = undef, ) { - validate_re($key, ['\A(0x)?[0-9a-fA-F]{8}\Z', '\A(0x)?[0-9a-fA-F]{16}\Z']) + validate_re($key, ['\A(0x)?[0-9a-fA-F]{8}\Z', '\A(0x)?[0-9a-fA-F]{16}\Z', '\A(0x)?[0-9a-fA-F]{40}\Z']) validate_re($ensure, ['\Aabsent|present\Z',]) if $key_content { @@ -69,7 +71,7 @@ define apt::key ( } if $key_server { - validate_re($key_server,['\A((hkp|http|https):\/\/)?([a-z\d]{0,62}\.)+[a-z\d]+(:\d{2,4})?$']) + validate_re($key_server,['\A((hkp|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?$']) } if $key_options {