ansible-vault fails if vault-pass is passed when env variable defined

I spent about 4 hours trying to figure out what was going on here.
This is the command I was using:
ansible-vault encrypt_string --vault-pass ~/blah/vault_key

Every time I ran this, I was greeted with an error:
ERROR! The vault-ids default,default are available to encrypt. Specify the vault-id to encrypt with --encrypt-vault-id

Turns out, I had to unset my vault-pass env variable for this to work:
ANSIBLE_VAULT_PASSWORD_FILE=~/blah/vault_key

unset ANSIBLE_VAULT_PASSWORD_FILE

It would have saved me a lot of time if the error message actually said what the vault-id path was, which i thought was different than a vault-pass for some reason, or if the system just de-duplicated the multiple vault-keys.

So I guess what I’m asking is, is there someone that wants to help prevent another person from wasting hours of their time on this? :slight_smile: