When Vagrant (or VirtualBox?) shares folder from Windows host, all files inside are made executable (because Windows uses different filesystem). This makes it impossible to run Ansible with invetory file that is located in shared dir (default location is /vagrant) and gives the following error:
vagrant@node:~$ ansible-playbook -i /vagrant/inventory.devbox /vagrant/node. yml ERROR: The file /vagrant/inventory.devbox 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.devbox`. Of course, chmod doesn't work in this situation. I tried to hack it with #!/bin/cat shebang line, but it failed again with "cat: unrecognized option '--list'", which couldn't work anyway, because executable inventories are supposed to return JSON. There are two solutions: 1. copy inventory file every time to Linux filesystem, change permissions and execute from there 2. tell Ansible to ignore executable bit and threat file as plain inventory Is solution 2 possible? If not - does this story worth implementing solution 2? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7af1d03f-083f-4e60-84d5-7760e9b32a95%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
