Allow weak SSL verification for apt_key
[puppet-modules/puppetlabs-apt.git] / lib / puppet / type / apt_key.rb
index ca88f867eab26918b43ad729dd29a7b53ec754e2..8c5c84c886f83c3bc296b0e06e50ff73af3d1391 100644 (file)
@@ -64,10 +64,6 @@ Puppet::Type.newtype(:apt_key) do
     end
   end
 
-  autorequire(:package) do
-    'dirmngr'
-  end
-
   newparam(:server) 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'
@@ -84,6 +80,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 verfication'
+    defaultto false
+  end
+
   newproperty(:fingerprint) do
     desc <<-MANIFEST
       The 40-digit hexadecimal fingerprint of the specified GPG key.