This project aim to R/W an ansible-vault yaml file
(This package develop with Ansible version 1.9.1’s ansible-vault.)
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))
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ansible-vault-1.0.1.tar.gz
(1.7 kB
view details)
File details
Details for the file ansible-vault-1.0.1.tar.gz.
File metadata
- Download URL: ansible-vault-1.0.1.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8380918ab383097a4949818d6dcf48c90c43381f7c66b46eb67c8e3c3c2f778
|
|
| MD5 |
0297662e7e73d5ef1fdc88a516583bbe
|
|
| BLAKE2b-256 |
8f969cd70cfc74289eb8171ac6611b4eef9b6f2dacf6fc73b23bff73bcacee8b
|