set password for key, if given
authorvarac <varacanero@zeromail.org>
Fri, 30 Nov 2012 22:51:32 +0000 (23:51 +0100)
committervarac <varacanero@zeromail.org>
Fri, 30 Nov 2012 22:51:32 +0000 (23:51 +0100)
lib/puppet/provider/gpgkey/gpgme.rb

index 7a37f45..4e50828 100644 (file)
@@ -15,6 +15,7 @@ Puppet::Type.type(:gpgkey).provide(:gpgme) do
     keydata += "Name-Comment: "   +keyname()+"\n"
     keydata += "Name-Email: "     +@resource.value(:email)+"\n"
     keydata += "Expire-Date: "    +@resource.value(:expire)+"\n"
+    keydata += "Passphrase: "     +@resource.value(:password)+"\n"
     keydata += "</GnupgKeyParms>\n"
 
     ctx.genkey(keydata, nil, nil)