Hello, I am trying to make simple NGINX template. I have development 
inventory (it is vagrant) and staging which is remote VPS. I want to make 
different default root folder and different log location for  these two 
environments. Ofcorse couldnt manage that :) .
I have this in my template:

{% if (inventory_hostname in groups['webservers']) %}
> access_log /var/log/nginx/nginx-access.log;
> error_log /var/log/nginx/nginx-error.log;
> {% endif %}
>
>
And for dev environment:



> {% if (inventory_hostname in groups['vagrant']) %}
>> access_log /vagrant/log/nginx/nginx-access.log;
>> error_log /vagrant/log/nginx/nginx-error.log;
>> {% endif %}
>>
>
Whatever inventory I choose when depoying ansible-playbook I get BOTH of 
cases created in nginx config file. I am obviously missing something here. 
Any advice?

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to