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.

Source Distribution

ansible-vault-1.0.4.tar.gz (2.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: ansible-vault-1.0.4.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ansible-vault-1.0.4.tar.gz
Algorithm Hash digest
SHA256 81e64a941961bb9fc62ef8339d63d62d1d8c6866841fecc58ffc5a8c78d5a05c
MD5 37c316c04f7a10dbd0cc6ac9b1e0ffcf
BLAKE2b-256 4e8e7f7b7d90d0f4745c9c1ee45192997bc7db515b1f8c2abc142ed279b01084

See more details on using hashes here.

Supported by

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