Skip to main content

R/W an ansible-vault yaml file

Project description

ansible-vault

This is not an official Ansible project.

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

Test result badge. Use black. Coverage Status


Quick Start

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))

Contributing

See CONTRIBUTING.md.


Links

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

Uploaded Source

Built Distribution

ansible_vault-4.0.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file ansible_vault-4.0.0.tar.gz.

File metadata

  • Download URL: ansible_vault-4.0.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ansible_vault-4.0.0.tar.gz
Algorithm Hash digest
SHA256 0158aa6a4921c2b79e0fed0d582849c340282aae0b429286ef0ab2d89b46a6ea
MD5 e4ca888e0e04968bab3527a703e4e4d5
BLAKE2b-256 4bb1f633a6fd5abd2dc5e4ac677e67640ef90a9578bcab6fb2508e837bef67df

See more details on using hashes here.

File details

Details for the file ansible_vault-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: ansible_vault-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ansible_vault-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89c29bf6180b5d49dd1b171d67fa9072aaa70c70fc4738f8c3937080dc719865
MD5 120dedf281b496424fa1491e22868de6
BLAKE2b-256 cde90b9b923656e300e883514c5a3b370aaa894d0bb908ee9f66d9f86a4f3771

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