Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-encrypt only if contents change #19

Open
jhkrischel opened this issue Jun 28, 2017 · 4 comments
Open

Re-encrypt only if contents change #19

jhkrischel opened this issue Jun 28, 2017 · 4 comments

Comments

@jhkrischel
Copy link

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.

@sydro
Copy link
Owner

sydro commented Jun 28, 2017

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

@flamein
Copy link

flamein commented Jul 7, 2017

can't you hook into ansible-vault view to grep a detached copy of the file? (ansible 2.3+ only though)

@matthew-goldman
Copy link

Big +1 to this.

@rohku
Copy link

rohku commented Jun 25, 2019

related - decrypting the file (manually) also seems to save the file.

  1. open file
  2. manually decrypt
  3. close file. No prompt to save since the local file is already changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants