R/W an ansible-vault yaml file
Project description
ansible-vault
This project aim to R/W an ansible-vault yaml file.
This is not Ansible official project.
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))
And see wiki.
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-2.1.0.tar.gz
(3.5 kB
view details)
File details
Details for the file ansible-vault-2.1.0.tar.gz
.
File metadata
- Download URL: ansible-vault-2.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ce8fdb5470f1449b76bf07ae2abc56480dad48356ae405c85b686efb64dbd5e |
|
MD5 | fc6541cbfc2316197f07e0fa3a4104d9 |
|
BLAKE2b-256 | 3868968aea6bc9894fb0e19aeaa03f6b284b573b5815f4f3d3a9daa9e519c3df |