I understand your complaint, however, the docs aren't right because they don't match the code.
We will not be breaking existing users by changing this. What you should do of course is put your ansible.cfg in the user specific location or the global location, and not use the other if you do not like that behavior. People keep playbooks in various directories of their repo and it does not make sense. pb/site.yml pb/other/include.yml And may run them from *both* places, and in which case the latter would not find ansible.cfg The code is correct and will not be changing, I'd suggest, again, not using this behavior if you don't like it. On Fri, Dec 6, 2013 at 2:22 AM, anatoly techtonik <[email protected]>wrote: > I am sure the docs are right. Reading ansible.cfg from playbook.yml > directory is intuitive and valid. It is much better than reading > playbooks from random dir. I can easily imagine my IDE to be set to > the wrong working directory with ansible.cfg inside. I'd hate to debug > this issue. > -- > anatoly t. > > > On Thu, Dec 5, 2013 at 11:48 PM, Michael DeHaan > <[email protected]> wrote: > > The code behavior should not change here, we just want to clarify docs. > > > > -- Michael > > > > On Dec 5, 2013, at 12:42 PM, anatoly techtonik <[email protected]> > wrote: > > > > Made pull request to fix that. > > > > On Tuesday, December 3, 2013 10:04:38 PM UTC+3, Matt Martz wrote: > >> > >> I believe this has already been mentioned in a ticket recently. Perhaps > >> this comment: > >> https://github.com/ansible/ansible/issues/5115#issuecomment-29583941 > > > > > >> > >> -- > >> Matt Martz > >> [email protected] > >> > >> On December 3, 2013 at 12:58:07 PM, Grzegorz Nosek ( > [email protected]) > >> wrote: > >> > >> Hi, > >> > >> The docs at http://www.ansibleworks.com/docs/intro_configuration.htmlsay: > >> > >> The mechanism for doing this is the “ansible.cfg” file, which is looked > >> for in the following locations: > >> > >> * /etc/ansible/ansible.cfg > >> * ~/.ansible.cfg > >> * ansible.cfg (in the playbook directory) > >> > >> However, I noticed that Ansible (v1.4.1) searches for the file in the > >> _current_ directory (not the playbook directory). Is this a bug in the > >> docs or am I doing something wrong? I'd like to have a project-wide > >> ansible.cfg file used with certain playbooks regardless of my current > >> working directory. > >> > >> Best regards, > >> Grzegorz Nosek > >> > >> -- > >> 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 [email protected]. > >> For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > > 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 [email protected]. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > > You received this message because you are subscribed to a topic in the > > Google Groups "Ansible Project" group. > > To unsubscribe from this topic, visit > > > https://groups.google.com/d/topic/ansible-project/nYZlptv4KZc/unsubscribe. > > To unsubscribe from this group and all its topics, send an email to > > [email protected]. > > For more options, visit https://groups.google.com/groups/opt_out. > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Michael DeHaan <[email protected]> CTO, AnsibleWorks, Inc. http://www.ansibleworks.com/ -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
