Skip to main content

R/W an ansible-vault yaml file

Project description

https://travis-ci.org/jptomo/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.

Filename, size & hash SHA256 hash help File type Python version Upload date
ansible-vault-1.0.4.tar.gz (2.8 kB) Copy SHA256 hash SHA256 Source None Nov 28, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page