# List all ansible-vault encrypted files?

**URL:** <https://forum.ansible.com/t/list-all-ansible-vault-encrypted-files/23572>\
**Category:** Ansible Project\
**Created:** [January 26, 2017, 9:21pm UTC](https://forum.ansible.com/t/list-all-ansible-vault-encrypted-files/23572 "2017-01-26T21:21:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alicia\_Smith](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Alicia\_Smith](https://forum.ansible.com/u/Alicia_Smith)\
**Post date:** [January 26, 2017, 9:21pm UTC](https://forum.ansible.com/t/list-all-ansible-vault-encrypted-files/23572/1 "2017-01-26T21:21:09Z")

</div>

Is there a way to list all files in a repo that are encrypted via ansible-vault?

If there is I haven’t figured it out yet. I’ve searched on google and everything just points to how to use view or edit.  
I was hoping there was something like “ansible-vault status” that would list all files in the repo in one column and whether encrypted or not in a second column.  
It would also help people automate figuring out which files are not encrypted that should be without having to read/view/edit/open every file. For example - all conf files should be encrypted. This would help confirm they are.

Just a thought, if there is no way of doing this currently, I’ll submit an issue for it.

Thank you,

Alicia

---

<div class="post-metadata">

**Author:** ![Paul\_Totterman](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@Paul\_Totterman](https://forum.ansible.com/u/Paul_Totterman)\
**Post date:** [January 28, 2017, 11:05am UTC](https://forum.ansible.com/t/list-all-ansible-vault-encrypted-files/23572/2 "2017-01-28T11:05:16Z")

</div>

> Is there a way to list all files in a repo that are encrypted via ansible-vault?

grep -rl ‘$ANSIBLE\_VAULT;1.1’

Look at the first line of an ansible vault encrypted file and play around a bit with the magic string

I also prefer to name my vault files ending in .vault.

Cheers,  
Paul

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [January 28, 2017, 11:30am UTC](https://forum.ansible.com/t/list-all-ansible-vault-encrypted-files/23572/3 "2017-01-28T11:30:51Z")

</div>

Interesting thought. Is this just for your encrypted binary files, or  
does this work with encrypted yml files, too?

Johannes (is off reading the docs)

---

<div class="post-metadata">

**Author:** ![Paul\_Totterman](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@Paul\_Totterman](https://forum.ansible.com/u/Paul_Totterman)\
**Post date:** [January 28, 2017, 11:32am UTC](https://forum.ansible.com/t/list-all-ansible-vault-encrypted-files/23572/4 "2017-01-28T11:32:41Z")

</div>

> Interesting thought. Is this just for your encrypted binary files, or  
> does this work with encrypted yml files, too?

What encrypted binary files ?-) I only have encrypted YAML files

Cheers,  
Paul

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [January 28, 2017, 11:33am UTC](https://forum.ansible.com/t/list-all-ansible-vault-encrypted-files/23572/5 "2017-01-28T11:33:47Z")

</div>

Nice. 😉

Johannes
