title: Chef: obtain value from remote command
body: <p>I am using a cookbook to randomly generate GPG keys for users (e.g. in this case duplicity) I need to be able to use the value of the public key ID when I run (e.g. when you run gpg --list-keys) in my chef recipe. I need to use the ID in the following command: </p>
  
  <p><code>PASSPHRASE=\"\" duplicity full --encrypt-key=\"[ID]\" [SRC] rsync://[USER]@[SERVER].[FQDN].[tld]:#{hostname}/</code></p>
  
  <p>Any suggestions how I can achieve this? </p>