Skip to main content

R/W an ansible-vault yaml file

Project description

This project aim to R/W an ansible-vault yaml file

(This package develop with Ansible version 1.9.1’s ansible-vault.)

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.3.tar.gz (1.7 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for ansible-vault-1.0.3.tar.gz
Algorithm Hash digest
SHA256 677491b1d68532ed6a4d0c5d81849d644c7ed41b28b4dd3737aa7e0ee04e02af
MD5 8fb4929466ef687c5df235acc302de87
BLAKE2b-256 21d8b0b2c955530bca3e1eb889693b2dbe36d2b747d5728e683207c553360084

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