Whenever I run
ansible-playbook server.yml -e env=production in my vagrant box I get the error.
ERROR: problem running /vagrant/hosts/development --list ([Errno 8] Exec format error)
My suspicion is it has something to do with Windows, shared folders, and permission issues which is alluded to here https://github.com/mitchellh/vagrant/issues/713.
@DemaniClassic had a working solution before the “Refactor hosts files” commit.
How can I replicate DemaniClassic’s solution with the new update to the hosts files?
In your Vagrantfile, you can try adding the following:
config.vm.synced_folder File.join(ANSIBLE_PATH, 'hosts'), '/vagrant/hosts', owner: 'vagrant', group: 'www-data', mount_options: ['dmode=755', 'fmode=644']
I think that will remove
config.vm.synced_folder File.join(ANSIBLE_PATH, ‘hosts’), ‘/vagrant/hosts’, owner: ‘vagrant’, group: ‘www-data’, mount_options: [‘dmode=755’, ‘fmode=644’]
in my vagrantfile and it worked! @QWp6t Thank you so much.
roots/trellis#460 proposes to add @QWp6t’s solution into Trellis. Could use a few Windows users to test and confirm that it works for their setup.