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, 2019 in Ansible by Anjana
590 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, 2019 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, 2019 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, 2019 by Pam

Related Questions In Ansible

0 votes
1 answer

Error saying permission denied while running ansible playbook

Hey @Neha, add the following line to ...READ MORE

answered Feb 8, 2019 in Ansible by Amy
1,927 views
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, 2019 in Ansible by Dee
94 views
0 votes
1 answer

Error while running playbook consisting of roles - Ansible

You get this error because ansible was ...READ MORE

answered Mar 12, 2019 in Ansible by William
79 views
+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,400 points
309 views
0 votes
1 answer
+1 vote
3 answers