But it looks like I'm wrong. In my script, prior to calling 
ansible-playbooks, I've printed pwd. It is not the directory containing the 
playbooks.

In the elasticsearch playbook, I've captured the value of pwd and printed 
it using the debug module. The current directory is now the directory 
containing the playbooks. Ansible is changing directories.

I'm not saying this is a bug, but it certainly has the affect of unintended 
consequences. Sure, I can change the name of my playbook to work around it. 
But I have to image it's avoidable by Ansible.

On Sunday, March 22, 2015 at 10:56:18 PM UTC-4, Greg Levine wrote:
>
> It is an elasticsearch error, but I'm not sure it's unrelated to Ansible. 
> Reading the elasticsearch source, it looks like elasticsearch looks for a 
> resource to load called elasticsearch.yml. It looks in a few places, but my 
> suspicion is that it finds this file in $PATH. So does Ansible add 
> playbooks to $PATH?
>
> Elasticsearch will look in the current working directory for 
> elasticsearch.yml. However, I'm skeptical that this is the reason because 
> I'm running a script that loads the playbooks and calls ansible-playbook on 
> them. When I'm running my script, I'm not running it from the same 
> directory where the playbooks are located. And my script doesn't cd into 
> the playbooks directory or add the playbooks directory or any playbooks to 
> $PATH. So unless, Ansible cd's into the playbooks directory, the $PATH 
> scenario is more likely. It's entirely possible, but I have my doubts that 
> Ansible is changing directories since it doesn't seem necessary.
>
> On Sunday, March 22, 2015 at 4:57:05 PM UTC-4, Brian Coca wrote:
>>
>> That seems an elastic search error, unrelated to ansible. 
>>
>>
>> -- 
>> Brian Coca 
>>
>

-- 
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].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5e9b73a8-a9c4-49c5-b7df-eb10c04d3843%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to