Ansible, sudo, Bitwarden
The latest version of sshpass
supports a --prompt
/-P
argument, which
controls the string the tool expects, after which it will send the specified
password. Using this, it is possible to send a password from Bitwarden to
Ansible, like so:
sshpass -f <(bwpass …) -P 'SUDO password:' ansible-playbook -bK …