When running tests with molecule:
molecule tests
and some files are protected with ansible vault, the --vault-password-file must be specified to provide the password to decrypt their content.
Although it is possible to do that with converge
molecule converge -- --vault-password-file ~/.vault.txt
it fails with molecule tests
$ molecule test -- --vault-password-file ~/.vault.txt
Usage: molecule test [OPTIONS]
Error: Got unexpected extra arguments (--vault-password-file ~/.vault.txt)
Using the ANSIBLE_VAULT_PASSWORD_FILE environment variable like so:
ANSIBLE_VAULT_PASSWORD_FILE=$HOME/.vault.txt molecule test
will bypass molecule arguments parsing logic and let ansible know where the vault password is located.