Hi All,
I hope you all are doing good in these trying times !!
I am working on a POC for using a executable file as my ansible vault password.
So my ansible command to run playbook looks something like this
ansible-playbook srev_user.yml --vault-id /etc/ansible/my-client.py -vvv
and my-client.py script looks like this
import subprocess
cmd = subprocess.Popen([“echo”, “abc123”])
cmd.wait()
so this script output to “abc123” which is my ansible password.
But this doesnt work and shows bellow error
[WARNING]: Error in vault password file loading (None): Problem running vault password client script /etc/ansible/my-client.py ([Errno 8] Exec
format error). If this is not a script, remove the executable bit from the file.
ERROR! Problem running vault password client script /etc/ansible/my-client.py ([Errno 8] Exec format error). If this is not a script, remove the executable bit from the file.
Please suggest on the same.
Regards,
Ankur Porwal