Re: [ansible-project] Setting a variable by conditional in a playbook

2014-05-27 Thread Michael DeHaan
+1 to group_variables over set_fact. It's more native and probably more intuitive. set_fact should only be used for really oddball niche scenarios, like when you need to multiply a number by 10 or round a value, etc. On Tue, May 27, 2014 at 10:42 AM, Brian Coca wrote: > I just set uwsgi_en

Re: [ansible-project] Setting a variable by conditional in a playbook

2014-05-27 Thread Brian Coca
I just set uwsgi_env in group_vars/{production,development}, but you should be able to do this also use set_fact and when to do the same.​ -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving email

[ansible-project] Setting a variable by conditional in a playbook

2014-05-27 Thread Lars Sommer
I have spent the last few hours trying to find a way to do this and keep running into formatting issues with every suggestion I find. What I am trying to accomplish is to have a variable that is set based on the value of another variable. So if {{ group }} == dev* then I want to set uwsgi_env: