ansible.cfg ignored in Mac OS X 10.9

1,576 views
Skip to first unread message

Marco Garcês

unread,
Jan 16, 2014, 10:08:29 AM1/16/14
to ansible...@googlegroups.com
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!

Matt Martz

unread,
Jan 16, 2014, 10:40:27 AM1/16/14
to ansible...@googlegroups.com, Marco Garcês
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].
-- 
Matt Martz
ma...@sivel.net
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Michael DeHaan

unread,
Jan 16, 2014, 10:44:30 AM1/16/14
to ansible...@googlegroups.com, Marco Garcês
Pretty sure this isn't broke, let us know how you think it is?


--
Michael DeHaan <mic...@ansibleworks.com>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

Marco Garcês

unread,
Jan 17, 2014, 1:50:44 AM1/17/14
to ansible...@googlegroups.com, Marco Garcês
I have answered yesterday, but it seems that my answer did not got here...
Here is my ansible.cfg:

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

Michael DeHaan

unread,
Jan 17, 2014, 10:14:14 AM1/17/14
to ansible...@googlegroups.com, Marco Garcês
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.


Marco Garcês

unread,
Jan 17, 2014, 10:25:00 AM1/17/14
to ansible...@googlegroups.com, Marco Garcês
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... =/

Trevor Hartman

unread,
Mar 4, 2014, 6:28:47 PM3/4/14
to ansible...@googlegroups.com, Marco Garcês
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.

Michael DeHaan

unread,
Mar 4, 2014, 6:35:53 PM3/4/14
to ansible...@googlegroups.com, Marco Garcês
There's nothing OS X specific about this.

Really, there is not :)

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.




Trevor Hartman

unread,
Mar 4, 2014, 6:37:45 PM3/4/14
to ansible...@googlegroups.com, Marco Garcês
[default]
hostfile = hosts
host_key_checking = False
forks = 15

Trevor Hartman

unread,
Mar 4, 2014, 6:38:57 PM3/4/14
to ansible...@googlegroups.com, Marco Garcês
You're right, default vs defaults typo!
Reply all
Reply to author
Forward
0 new messages