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
443 views
Can you please show your playbook, that you're trying to run?

Here's the playbook:

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

3 answers to this question.

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
64 views
0 votes
1 answer
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
215 views
0 votes
1 answer
0 votes
3 answers