skip to navigation
skip to content

ansible-vault 1.1.1

R/W an ansible-vault yaml file

This project aim to R/W an ansible-vault yaml file

You can install with pip.

$ pip install ansible-vault

When you have an ansible-vault file, then you can read file. See below.

from ansible_vault import Vault

vault = Vault('password')
data = vault.load(open('vault.yml').read())

When you have to write data, then you can write data to file. See below.

from ansible_vault import Vault

vault = Vault('password')
vault.dump(data, open('vault.yml', 'w'))

# also you can get encrypted text
print(vault.dump(data))
 
File Type Py Version Uploaded on Size
ansible-vault-1.1.1.tar.gz (md5) Source 2017-10-03 3KB