Error saying "ERROR: problem running ansible_hosts --list ([Errno 8] Exec format error)" while running ansible playbook

0 votes

I have ansible 1.2.3 installed and I tried running the ansible playbook using the following command:

ansible-playbook -i ansible_hosts playbook.yml

I get the following error:

ERROR: problem running ansible_hosts --list ([Errno 8] Exec format error)
Feb 4 in Ansible by Anjana
Can you please show your playbook, that you're trying to run?

Here's the playbook:

- hosts: development
  sudo: yes
    - name: install curl
      apt: pkg=curl update_cache=yes

3 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Upgrading the ansible version worked for me.
answered Feb 4 by Harsh
0 votes

Hey @Anjana, you need to remove execution rights on ansible_hosts

chmod a-x ansible_hosts

if this doesn't work. try it with sudo

sudo chmod a-x ansible_hosts
answered Feb 4 by Pam
0 votes

Also, remove the execute permission for the ansible files using the following command:

find . -type f -exec chmod -x {} \;
answered Feb 4 by Pam

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Error saying script is already running - Ansible playbook error

Remove the previous processes before running this ...READ MORE

answered Feb 8 in Ansible by Dee
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
3 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.