vagrant-inventory file causes error
Closed this issue · 2 comments
Hi,
During the provisioning step, I get this error:
ERROR: The file vagrant-inventory is marked as executable, but failed to execute correctly. If this is not supposed to be an executable script, correct this with `chmod - x vagrant-inventory`.
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
Fixable with approach suggested here. Below, please find my changed file vagrant-inventory
file:
#!/bin/bash
cat <<EOF
{
"vagrant": ["192.168.50.50"],
"vagrant:vars": {
"vhostTemplatePath": "templates/vhost.conf",
"mysqlTemplatePath": "templates/mysql"
}
}
EOF
It sounds like this is issue has been fixed by the Ansible core devs upstream -- see ansible/ansible#10068 and ansible/ansible#11643. Though I'm not sure (1) if it's made its way into a general release yet and (2) if their fix will work with inventory files that have no extension (versus inventory files that are .INIs). It's complicated for me to replicate the issue b/c it seems to be primarily due to pecularities with Windows filesystems.
If you update your Ansible to the latest released version, do you still get the same error?
I had the same issue running ansible from Vagrant on a Windows host, but it seems that the issue has been fixed in ansible 2.0.0.2 and above.