Hi,
We are storing private keys in a DB and when we need to run a playbook would like to pass these SSH keys as an argument instead of storing as a file locally.
I tried something like this:
ansible-playbook -i "1.2.3.4," --extra-vars="ansible_user=username ansible_ssh_private_key_file=$KEY" playbooks/playbook.yml
but get message 'No such file or directory'
It works if I specify a key file (and location). $KEY in an environment variable with private key contents.
So, is there a way to pass $KEY without having to create a file?
Thank you