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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ansible_vault-3.1.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-3.1.0.tar.gz
Algorithm Hash digest
SHA256 dd20316986b8a9a3e23e70d9f28f0e899c0eec81449c4c39325665cbc58cd291
MD5 207e6d8e435acf8241cc5322e18c131a
BLAKE2b-256 4e25d37abe947fc5e441e1b34aa768bb411a7d6c8e5469172b94fc9434edc1b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ansible_vault-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05615e1111d289f544f79902489fe536dd54d53372d397fa97257eef4872ae59
MD5 84d6c03fd5173d7f9f0591f2f34ca85c
BLAKE2b-256 280b74d008472b7692cf40df77a555509b251c25e49002b6a7ec30bcb85034ea

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