R/W an ansible-vault yaml file
Project description
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))
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.5.tar.gz
(3.2 kB
view details)
File details
Details for the file ansible-vault-1.0.5.tar.gz
.
File metadata
- Download URL: ansible-vault-1.0.5.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0a059add6a246d60db3cb947a2fec4b3d08228e979ac62c7b155ee38f83e6d7 |
|
MD5 | 4a7124921bf544c51caf41c8e4bd729c |
|
BLAKE2b-256 | bb4ca79617e7a43a4b1d3b75e6352e0b6b8aac9cdbdce05b3acd4ea31d0b990e |