To be honest, the main usercase is to avoid typing `-i hosts` every time 
for bootstrap
of config from github checkout. There is only one localhost and if I can 
just place
ansible.cfg in repository together with playbook - it will solve all my 
problems. =)

  git clone myworkstation /tmp/a
  ansible-playbook /tmp/a/playbook.yml

On Sunday, December 1, 2013 9:16:46 PM UTC+3, Michael DeHaan wrote:
>
> Don't do that then :)
>
> -- Michael
>
> On Dec 1, 2013, at 1:07 PM, anatoly techtonik 
> <[email protected]<javascript:>> 
> wrote:
>
> I prefer if it worked as described in docs - independent of current user 
> position
> in directory tree hierarchy. I execute ansible playbooks using relative 
> paths, from
> different dirs, and if my current dir will happen to contain ansible.cfg 
> from another
> project - this may lead to disaster. For me reading configuration pieces 
> implicitly
> from CWD  is an anti-pattern.
>
> On Sunday, December 1, 2013 8:55:07 PM UTC+3, Michael DeHaan wrote:
>>
>> We will look into docs but it works correctly.
>>
>> -- Michael
>>
>> On Dec 1, 2013, at 12:53 PM, anatoly techtonik <[email protected]> wrote:
>>
>> On Sunday, December 1, 2013 2:44:03 PM UTC+3, anatoly techtonik wrote:
>>>
>>> On Wednesday, March 20, 2013 7:22:53 PM UTC+3, Mavimo wrote:
>>>>
>>>> I also use PROJECT_FOLDER/ansible.cfg 
>>>>
>>>> [defaults] 
>>>> hostfile = ./etc/hosts 
>>>>
>>>
>>> That's awesome. Thanks.
>>>
>>> More info:  http://www.ansibleworks.com/docs/intro_configuration.html
>>>
>>
>> It appears that look up from playbook's directory is broken. The command 
>> above will
>> point to hosts file from the current directory and not from playbook's 
>> dir. I filled an issue here:
>> https://github.com/ansible/ansible/issues/5115 
>>  
>> -- 
>> 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] <javascript:>.
> 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.

Reply via email to