ansible.cfg ignored in Mac OS X 10.9

Hi there,

I am using ansible from github checkout (ansible 1.5 (devel 87e7b9e5cc) last updated 2014/01/16 15:40:55 (GMT +200)), and doing the normal “source $ANSIBLE_HOME/hacking/env-setup” to get things working.
My OS is Mac OS X 10.9 (Mavericks)

I have a small ansible project using roles, and on the root of that project, I have “ansible.cfg” with a bunch of settings.

The thing is, the config file it’s not being respected; I have tried to put it in ~/.ansible.cfg, and also on /etc/ansible/ansible.cfg, but when I run “ansible-playbook site.yml” it totally ignores the config file.

Also, I have tested with the pip’s version of ansible (ansible 1.4.4), still no sucess!
Running my project on a CentOS 6.5 box, everything works has expected, and the config file is respected.

Is someone else having this issues, or is able to replicate my setup?

Thank you in advance!

Maybe you could share your ansible.cfg file with us? Maybe there is an issue there. I have seen some people use [default] as a section header before, however the section header is really [defaults].

Pretty sure this isn’t broke, let us know how you think it is?

I have answered yesterday, but it seems that my answer did not got here…
Here is my ansible.cfg:
https://gist.github.com/mgarces/f044f586afbbb150c254

It’s a very simple one. I know it’s working when I can call ansible-playbook without the -i argument.

Yep, you had replied to me directly instead.

There’s nothing that would cause a configuration file to have any problems on OS X specifically.

You might have to do some more digging.

I dont know how this was fixed… but:

I did a checkout from git, for my own project, and now it works as it should.

No clue what was wrong on the other directory… =/

I have this same problem. ansible.cfg is ignored in all places, OS X 10.9.1. I’ll post back if I get it working.
One thing to note is if I introduce a syntax error in ./ansible.cfg, ansible immediately complains. When I remove it, ansible runs fine but ignores the actual config.

There’s nothing OS X specific about this.

Really, there is not :slight_smile:

I suspect you may have a header that is not “defaults” so your INI file is in the wrong section or something.

Pasting your ansible.cfg contents may help.

[default]
hostfile = hosts
host_key_checking = False
forks = 15

You’re right, default vs defaults typo!