# Ansible vault needs a view/show command

**URL:** <https://forum.ansible.com/t/ansible-vault-needs-a-view-show-command/16801>\
**Category:** Ansible Developer\
**Created:** [November 17, 2014, 12:40am UTC](https://forum.ansible.com/t/ansible-vault-needs-a-view-show-command/16801 "2014-11-17T00:40:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![edrozenberg](https://avatars.discourse-cdn.com/v4/letter/e/a6a055/32.png) [@edrozenberg](https://forum.ansible.com/u/edrozenberg)\
**Post date:** [November 17, 2014, 12:40am UTC](https://forum.ansible.com/t/ansible-vault-needs-a-view-show-command/16801/1 "2014-11-17T00:40:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [November 17, 2014, 2:32am UTC](https://forum.ansible.com/t/ansible-vault-needs-a-view-show-command/16801/2 "2014-11-17T02:32:08Z")

</div>

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

[https://github.com/ansible/ansible/pull/7041](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](https://github.com/ansible/ansible/pull/8694)

And  
[https://github.com/ansible/ansible/pull/8602](https://github.com/ansible/ansible/pull/8602)
