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.

This is not Ansible official project.

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

Uploaded Source

File details

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

File metadata

  • Download URL: ansible-vault-1.2.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for ansible-vault-1.2.0.tar.gz
Algorithm Hash digest
SHA256 984c5fe1a875d55669c9c167fd4265cf5c6446de4a6a478e0a057a4d43e6608c
MD5 eb3de5ad3258e2c9f6ba304d47017868
BLAKE2b-256 45656bd8f96a59564cbe92829b81996540744676c226b92c2ab60995037ac299

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