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:
PASSPHRASE=\"\" duplicity full --encrypt-key=\"[ID]\" [SRC] rsync://[USER]@[SERVER].[FQDN].[tld]:#{hostname}/
Any suggestions how I can achieve this?