There probably several ways of doing this. To start with have a look at 'host_vars' - you can set variables for each machine in your inventory: http://docs.ansible.com/intro_inventory.html#host-variables
You will probably find very soon after that you want to set the same variables for groups of servers, so read about group vars as well (on the same page). Hope this helps, Jon On Monday, June 22, 2015 at 12:46:56 PM UTC+1, Dhanasekaran Anbalagan wrote: > > Hi Guys, > > I am new to ansible world, Based on hostname I need to select variables > and feed input to template file. > > In my case :: I need to deploy app on multiple hosts, based on hostname I > need to configure db_name and db_user and db_pass etc.. > > Please guide me, How to do this. > > > -Dhanasekaran. > > Did I learn something today? If not, I wasted it. > -- 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/2f10f20f-87d7-47ea-a28f-5fad65c093f4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
