R/W an ansible-vault yaml file
Project description
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))
Project details
Release history Release notifications | RSS feed
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.0.tar.gz
(1.3 kB
view details)
File details
Details for the file ansible-vault-1.0.0.tar.gz
.
File metadata
- Download URL: ansible-vault-1.0.0.tar.gz
- Upload date:
- Size: 1.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7515bf53c9a1b9bb3c1a9e6a88142017b6ec98b2846887e5dd655d5df2c4424f
|
|
MD5 |
765a1fea7dc2a22019f1800f4a769168
|
|
BLAKE2b-256 |
5d13846d1a82aa824966b0244b435bd0415c34c174f9dfd867597d41842cb601
|