I want to view a file that has been encrypted with ansible-vault, but I 
don't want to make any changes. The ansible-vault command doesn't have an 
option to just *cat* the decrypted file.  Here are the options available:

➜  defaults git:(master) ✗ ansible-vault --help
Usage: ansible-vault [*create|decrypt|edit|encrypt|rekey]* [--help] 
[options] file_name

Options:
  -h, --help  show this help message and exit

See 'ansible-vault <command> --help' for more information on a specific 
command.

So I've been using ansible-vault edit command to view the file and then 
quit the editor without saving when done viewing the contents. 
Surprisingly, even though I quit out of the editor without saving, it 
changes the file anyway.  Why is this?  When I do a git status I see the 
file is modified and the SHA1 has been changed. See below for an example 
where no changes were saved:

➜  defaults git:(master) openssl sha1 main.yml

SHA1(main.yml)= 63acb6f65ae7d1ad34e047e80acd8857ebab5692

➜  defaults git:(master) ansible-vault edit main.yml 

Vault password: 

➜  defaults git:(master) ✗ openssl sha1 main.yml      

SHA1(main.yml)= 7c48df4f13402558c0e1ca691250a0e8be0bc548

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6d7fbfd0-ca4d-48ac-a4f2-56a8cc2dd0c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to