Skip to main content

R/W an ansible-vault yaml file

Project description

https://travis-ci.org/tomoh1r/ansible-vault.svg?branch=master

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


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)

Uploaded Source

File details

Details for the file ansible-vault-1.0.5.tar.gz.

File metadata

File hashes

Hashes for ansible-vault-1.0.5.tar.gz
Algorithm Hash digest
SHA256 b0a059add6a246d60db3cb947a2fec4b3d08228e979ac62c7b155ee38f83e6d7
MD5 4a7124921bf544c51caf41c8e4bd729c
BLAKE2b-256 bb4ca79617e7a43a4b1d3b75e6352e0b6b8aac9cdbdce05b3acd4ea31d0b990e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page