Ansible Vault API (decrypt programmatically)

857 views
Skip to first unread message

Tom Paine

unread,
Sep 11, 2015, 9:34:20 PM9/11/15
to Ansible Project
Are there any examples of using the Ansible Python API to decrypt an existing vault file?

Tom Paine

unread,
Sep 11, 2015, 10:04:19 PM9/11/15
to Ansible Project
Well, that was easy!

import ansible.utils

bar = dict()

bar = ansible.utils._load_vars_from_path("secrets.yml", results=bar, vault_password="password")

print bar


Syed Saad Ahmed ! Ahmed

unread,
Mar 20, 2017, 11:02:43 AM3/20/17
to Ansible Project
Are there any examples of using the Ansible Python API for rekeying an existing vault file?

Syed Saad Ahmed ! Ahmed

unread,
Mar 20, 2017, 11:02:44 AM3/20/17
to Ansible Project
Sit Tom Paine, Hope you are fine !
Will you please help me, i want examples of using python code for rekeying mechanism for an existing vault file ?
Your help will be highly appreciated.
Thanks


On Saturday, September 12, 2015 at 6:34:20 AM UTC+5, Tom Paine wrote:
Reply all
Reply to author
Forward
0 new messages