List all ansible-vault encrypted files?

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

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

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)

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

Nice. :wink:

Johannes