It seems most likely that your host has been inadvertently added to both groups.
It's hard to say without seeing your inventory. On Mon, Dec 16, 2013 at 2:37 AM, Marko Lisica <[email protected]>wrote: > 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. > -- 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]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
