Error when running ansible-playbook

I’ve installed Ansible 1.2.3 on Ubuntu Precise 64.

Running ansible-playbook -i ansible_hosts playbook.yml give me this error:

ERROR: problem running ansible_hosts --list ([Errno 8] Exec format error)

Here’s the content of ansible_hosts:

[development]
localhost   ansible_connection=local

and playbook.yml:

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

How can I make this work?

On StackOverflow: http://stackoverflow.com/q/18385925/351398

Sounds like your INI file is marked executable and should not be, which is making ansible try to evaluate it as an external inventory script.

If I may make a request, please don’t ask questions on stack overflow and duplicate post them here, there is a infinitely larger community here and it just requires that we duplicate-post the answer and all the conversation, which is somewhat frustrating.

–Michael

You were right. It works now.

I will use this group in the future. Also, I will answer with your answer on SO.

Thank you Michael.