[Errno 8] Exec format error on Ubuntu VBox guest on Win 10 Host

220 views
Skip to first unread message

TheRealPapa

unread,
Nov 11, 2015, 10:48:09 AM11/11/15
to Ansible Project
Hi, 
This is my first time with Ansible so forgive me if I missed something. I am trying to set up an Ansible script to run from my Ubuntu guest that allows me to provision Wordpress and all dependencies.

The host machine is a Windows 10 PC and I am running latest VBox with Ubuntu 14.04 as guest. I am also sharing a folder from host to guest and this is where I am creating the scripts.

I am following the instructions here on how to create the scripts. I have hit a problem at first testing the script. When I run (from the Ubuntu guest folder which contains the playbook.yml file, the shared folder with Win 10 host):

ansible-playbookplaybook.yml-i hosts

I get the error:

/media/sf_wpan/hosts--list([Errno8]Exec format error)

Researching this issue I have found a few places where the suggestion is to remove the executable attribute from the offending file.  So on the Ubuntu guest at the folder with playbook.yml I ran:

chmod -R -x *

But the error persists. My files are:

PLAYBOOK.YML

- hosts: wordpress

  roles:
    - server
    - php
    - mysql
    - wordpress


HOSTS

[wordpress]
10.0.0.76


 Thanks for any help.

Brian Coca

unread,
Nov 11, 2015, 10:54:53 AM11/11/15
to Ansible Project
You are using a static hosts file, you cannot execute it nor use the
--hosts parameter. that is only for dynamic hosts files (scripts). You
should remove the executable bits you added `chmod a-x
/media/sf_wpan/hosts`.

if you want to list the hosts in the file do:

ansible -i /media/sf_wpan/hosts --list-hosts


--
Brian Coca
Reply all
Reply to author
Forward
0 new messages