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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ansible_vault-4.0.1.tar.gz
  • Upload date:
  • Size: 15.8 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.1.tar.gz
Algorithm Hash digest
SHA256 0d73973a2d49299df3b9ba9650605bbbd49b77b7f39d91e8a4064123429635af
MD5 c3ec89b3707569e3258059cf6b4f2890
BLAKE2b-256 b822d0ce8bf4fd2903303268ba69fc8e883026592532d4b7af8142bba4dc6565

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ansible_vault-4.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3bea8e1581dc4c76171533019ca74550a245261ac69188f0313521933e2acfa
MD5 88db3ca9e0407e5133abfeeb2da3b730
BLAKE2b-256 0dd4be0ebe5bdfa5fcdc1e931518e382cd9ba268e7f2daaeaa208b116f934fad

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