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
6,068 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
15,924 views
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, 2019 in Ansible by Dee
1,212 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
2,714 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,064 views
+2 votes
1 answer
+1 vote
3 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP