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.1.1.tar.gz
(3.1 kB
view details)
File details
Details for the file ansible-vault-1.1.1.tar.gz
.
File metadata
- Download URL: ansible-vault-1.1.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
572b61d2ac3f7d14b9ce1708e3f0d8d99ca990ecd40822e53b7f66938bfc1a4a
|
|
MD5 |
74d71b8ada005538854330b778a4ff72
|
|
BLAKE2b-256 |
a9a3e5e135b833e2c439001bdaa8ad5a2698a1eaa4f52dbe66cdd186855afbbb
|