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 Coverage Status PyPI - Version PyPI - Python Version ansible-core Support Version GitHub License


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

Uploaded Source

Built Distribution

ansible_vault-4.1.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ansible_vault-4.1.0.tar.gz
  • Upload date:
  • Size: 15.9 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.1.0.tar.gz
Algorithm Hash digest
SHA256 7e985a9329e4728961d7a00f62412fa8ec246a4d832ad6e6d158165e0026529b
MD5 9cd187ebc5a5b967c0f536772759dd09
BLAKE2b-256 3360bd340a38b7d9fd4fcdd2df4a2b21f5e23af0481c5424c07d30668a7d6ed8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ansible_vault-4.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.1 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae2e194bb68cc94471d0cdba0705cea9390d9c3dfe6299eeb1d4ee36af602bd9
MD5 8ab6a9411bf97553101f5cc27566bd90
BLAKE2b-256 9e0b1c4e83665280bde1101862635ee6d69b43886002b30128d2fe82ba63cab7

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