Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge pull request #375 from raphink/dev/facts_perfs
[puppet-modules/puppetlabs-apt.git]
/
lib
/
puppet
/
type
/
apt_key.rb
diff --git
a/lib/puppet/type/apt_key.rb
b/lib/puppet/type/apt_key.rb
index 67420de0fad9502b83202ab0e21eba0493f2eacc..f55247314cc6f650bab39dd13735bcdda3b9dc3e 100644
(file)
--- 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
else
id = value.upcase
end
- if id.length == 16
- id[8..-1]
- else
- id
- end
+ id
end
end
end
end
@@
-49,8
+45,8
@@
Puppet::Type.newtype(:apt_key) do
end
newparam(:source) do
end
newparam(:source) do
- desc 'Location of a GPG key file, /path/to/file, http:// or https://'
- newvalues(/\Ahttps?:\/\//, /\A\/\w+/)
+ desc 'Location of a GPG key file, /path/to/file,
ftp://,
http:// or https://'
+ newvalues(/\Ahttps?:\/\//, /\A
ftp:\/\//, /\A
\/\w+/)
end
autorequire(:file) do
end
autorequire(:file) do
@@
-60,10
+56,10
@@
Puppet::Type.newtype(:apt_key) do
end
newparam(:server) 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'
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
end
newparam(:keyserver_options) do