0

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?

wsani
  • 113
  • 2
  • 2
  • 5
  • possible duplicate of [How can I display the output of a Opscode Chef bash command in my console?](http://stackoverflow.com/questions/17813592/how-can-i-display-the-output-of-a-opscode-chef-bash-command-in-my-console) – sethvargo Jan 16 '14 at 03:34

1 Answers1

0

I think this question is almost answered here: How can I display the output of a Opscode Chef bash command in my console?

In the ruby_block, you can do whatever you want with the output.

Community
  • 1
  • 1
StephenKing
  • 36,187
  • 11
  • 83
  • 112