ansible-vault

Reading and decoding bytes after modification by external process raises UnicodeDecodeError

Reading and decoding bytes after modification by external process raises UnicodeDecodeError Question: I’m trying to encrypt a string with ansible-vault. To do this, I open two temporary files, one to hold the value to be encrypted and one to hold the password to encrypt with. Reproducible example: import os import subprocess import tempfile value = …

Total answers: 1

Can't correctly dump Ansible vault into yaml with Python

Can't correctly dump Ansible vault into yaml with Python Question: I have a python dictionary with an Ansible vault as a value. I can’t seem to be able to correctly dump it into a yaml output with the correct formatting. I’m using the ansible-vault package to generate the encrypted data as follows: from ansible_vault import …

Total answers: 1