Skip to content

Instantly share code, notes, and snippets.

View sthames42's full-sized avatar

Steve sthames42

  • Cameron Park, California
View GitHub Profile
@sthames42
sthames42 / README.md
Last active January 2, 2026 19:02 — forked from utoddl/av-filter
Filter for "ansible-vault"ing YAML Data Values

Ansible Vault Filter

av-filter encrypts and decrypts YAML file values with ansible-vault and was created by Todd Lewis to encrypt only string values. I did some refactoring to provide encryption of all values and preservation of quotes and control characters in strings.

Unfortunately, Ansible does not reparse decrypted YAML values, which are strings, by default. They can be converted to non-string values with a filter. For example: my_value: "{{ vault.value | int }}". But quoted strings will decrypt to include