R/W an ansible-vault yaml file
Project description
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))
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.1.2.tar.gz
(3.1 kB
view details)
File details
Details for the file ansible-vault-1.1.2.tar.gz
.
File metadata
- Download URL: ansible-vault-1.1.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54f1da6a5d62ac09bd2d4d3c22d627f6e7483d06c391eb6e11d36b180867d697 |
|
MD5 | bcac21d987affb5b1aa53208d1a76e49 |
|
BLAKE2b-256 | 6411a3a72d16a3874eddd288c49a159d4464198ca9e804fe0ab052e328129f9c |