atom-ansible-vault
atom-ansible-vault copied to clipboard
Re-encrypt only if contents change
Since ansible-vault encryption uses a random salt, even if you make no changes to the text, on re-encryption, the file will change.
As an enhancement, revert to the original encrypted file if no changes to the decrypted file are made, when the editor is closed.
I know it. Possible solution is to check if file is in a git repository and checkout the file to preserve encryption. I think that other possibilities there aren't
can't you hook into ansible-vault view
to grep a detached copy of the file? (ansible 2.3+ only though)
Big +1 to this.
related - decrypting the file (manually) also seems to save the file.
- open file
- manually decrypt
- close file. No prompt to save since the local file is already changed.