Hi Michael, Cool, so my inventory files should look like this:
[webservers] web01 web02 web03 web04 [loadbalancers] lb01 lb02 [staging:children] webservers loadbalancers Is that correct? Many thanks, Kalman Speier On Wednesday, April 2, 2014 8:58:13 PM UTC+2, Kalman Speier wrote: > > Hi, > > I have a repository with the same structure as the best > practices<http://docs.ansible.com/playbooks_best_practices.html#directory-layout> > in the > docs, with two inventory files (staging and production). > My question is that how can I control the differences between those > environments (stage vs prod) with group variables? > > I know I can place vars into the inventory file, but I'm curious if there > any nicer way to do this? > Also the docs > says<http://docs.ansible.com/intro_inventory.html#splitting-out-host-and-group-specific-data>: > > "The preferred practice in Ansible is actually not to store variables in > the inventory file." > > So I'm wondering is there any other solution, like having a > "group_vars/staging.yml" for example or anything else? > > Many thanks, > Kalman Speier > > -- 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/0c22d550-7e7a-47c0-bcb1-f7f5df6f2ee5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
