Extract stored vault password from the RunDeck Key Storage

940 views
Skip to first unread message

f.ne...@gmail.com

unread,
Sep 7, 2017, 12:02:38 PM9/7/17
to rundeck-discuss
How the ansible password contents (or whatever password) can be extracted from the RunDeck key storage?
I need this password to use in my python script for ansible vault file decryption.

Joshua Thornton

unread,
Sep 8, 2017, 12:35:54 AM9/8/17
to rundeck-discuss
The best way to get this password isn't to extract it, but to use it as a secure option in your script.  Modify your job and add an option with the "Secure" input type, then choose the key that you want to pass.  There are a few ways to get the content into the script, but I think the easiest is using environment variables.  When your script runs it will be given access to that option as an environment variable so you can just call it. 

If you name your option securepass the env var will be $RD_OPTION_SECUREPASS.  

In Python you can call it like this:

import os
password
= os.environ['RD_OPTION_SECUREPASS']


Reply all
Reply to author
Forward
0 new messages