Re: [ansible-project] balanced configuration

2015-05-21 Thread Nicolas G
Thanks Mike you are right, removing the curly braces and using + pool worked. On Thursday, May 21, 2015 at 5:04:53 PM UTC-4, Mike Herron wrote: > > Assuming 'pool' is provided somewhere else, I don't think you want the > curly braces? > > {% for servers in groups['pool-' + pool ] %} > serv

Re: [ansible-project] balanced configuration

2015-05-21 Thread Mike Herron
Assuming 'pool' is provided somewhere else, I don't think you want the curly braces? {% for servers in groups['pool-' + pool ] %} server {{ hostvars[backend]['ansible_hostname'] }} {% endfor %} Or are you looking to run that task for all your pools? -- You received this message because you

Re: [ansible-project] balanced configuration

2015-05-21 Thread Nicolas G
Hi Brent , thanks for your reply. I was actually trying to avoid that as I was looking to achieve it in a more dynamic way so I don't have to maintain a static inventory of pools.. This is what I have tried but still not working : # inventory : [pool-a:vars] pool=a [pool-a] server1 server2 ser

Re: [ansible-project] balanced configuration

2015-05-19 Thread Brent Langston
What you describe is similar to a setup I've used in the past. We broke up this part of our inventory into "pools" which was determined by a fact set for the host. You could have poolA poolB and poolC, and db1, db2 and db3 respectively. poolA would connect to db1, poolB to db2, and poolC to db3.

[ansible-project] balanced configuration

2015-05-19 Thread Nicolas G
Hi, We have a 2 tiers environment where the front-end servers connects to the backend servers. As an example we have 30 application servers and 3 backend servers, let's say every backend server should support up to 10 frontend servers. We need Ansible to automatically setup the configuration s