Reputation: 29032
I'm attempting to run a playbook using a vault file, according to the docs by using the --vault-password-file
option.
Here is my command:
sudo -u ubuntu -H sh -c "cd ~/overseer; ansible-playbook generate_keys.yml -l mgmt --vault-password-file ~/.vaultpw"
When running that, I get this output:
ERROR: problem running / h o m e / u b u n t u / . v a u l t p w ([Errno 8] Exec format error)
I've tried using /home/ubuntu/.vaultpw
to no avail.
Also according to the docs, I have proper permissions on the file to read.
How can I fix this? It's not reading my vault password file correctly, it looks like it is interpreting each character as another argument
Upvotes: 1
Views: 6012
Reputation: 29032
Turns out that Ansible thought .vaultpw
was a script because its permissions were
-rwx------
I created the file with mode 0600
-rw-------
And it worked great.
Upvotes: 11