Ansible-vault encrypt; return value if already encrypted

DengelFred
Sun, 04 Aug 2024 21:01:59 +0000
Get Help

Hello,

I would like to run the encryption of some files automatically during git commit.
Unfortunately ansible-vault returns an error if the files are already encrypted, but this is obviously not an error, it’s the expected state.
But I need a return value of 0 (even if the files are already encrypted) in order to run it during the pre-commit checks.
Any Idea how to do that?

Thanks a lot
Thomas

4 posts - 2 participants