How can I pass the password of ansible-vault stored in an environment variable to the command
ansible-playbook play.yml -i hosts --ask-vault-pass
I can't pass a file or have an interactive shell to enter the password since the commands are run from a pipeline that does not support them.
I tried something like
echo $PASS | ansible-playbook play.yml -i hosts --ask-vault-pass
But that did not work.
I read the docs https://docs.ansible.com/ansible/latest/user_guide/vault.html but I couldn't find a solution there.