Ansible vault needs a view/show command

Hello,

Currently, the only way to “view” a vault file is to run the edit command:

ansible-vault edit

The side effect of running the edit is that the file is re-copied in place even
if no changes are made, triggering the changed indicator on the file if the
project is checked into any SCM (Subversion etc).

Vault needs a view command to be able to view the contents of a vault
file without causing any changes to the file. Often it is required to view
a vault in order to make sure the contents are correct and determine
whether any changes to the vault file need to be made.

Ideally “ansible-vault edit” should also not change the file if the contents
are not actually changed, but this may not be possible due to the
way security and copy-in-place is implemented.

Regards,
–Ed

The “view” command is in the devel branch and will be included as part of 1.8:

https://github.com/ansible/ansible/pull/7041

As for not modifying the file if no change is made, see:

https://github.com/ansible/ansible/pull/8694

And
https://github.com/ansible/ansible/pull/8602