Skip to content

No longer maintained, here's the workaround #19

@RobinDaugherty

Description

@RobinDaugherty

This project seems to be unmaintained. Pull requests have languished for years.

But fortunately, this project is no longer necessary! You can configure git to use ansible-vault directly.

First, add a git driver for "ansible-vault" designated files, instructing it to use ansible-vault to convert them to text in order to diff:

git config --global diff.ansible-vault.textconv "ansible-vault view"

Instruct git not to cache the plaintext, since that might present a security problem:

git config diff.ansible-vault.cachetextconv false

In your project, add .gitattributes to identify the files that should be treated as "ansible-vault" files by git:

# add to .gitattributes
group_vars/all.yml diff=ansible-vault merge=binary

This is based on https://stackoverflow.com/a/39511274

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions