Sorry folks, possibly bad form to self-reply purely in order to bump. Am a bit stuck on this though so some assistance would be invaluable.
Thinking about this problem has made me wonder if it would be possible/ useful for Ansible to natively support some sort of per-inventory yaml variables file? Perhaps something called 'inventory_vars' which worked in a similar way as 'group_vars' but for inventories? Cheers, Edd On Thursday, January 23, 2014 9:33:21 AM UTC, Edd Grant wrote: > > Hi folks, > > I need to model some data on a per-inventory basis, i.e. each inventory > would define the same variables with different values. This seems simple > enough when using simple variables i.e. no lists or hashes e.g. > > # production.ini > [jenkins-master] > mrs-jm01.dev.eddgrant.com > > [mrs-database-servers] > mrs-db01.dev.eddgrant.com > mrs-dm02.dev.eddgrant.com > > [all:vars] > http_proxy=www-cache.eddgrant.com:80 > > However, I want to use this in conjunction with Ansible's environment > feature <http://docs.ansible.com/playbooks_environment.html> and ideally > want to be able to define a hash in each inventory file which I can then > reference later on. As far as I can tell there is no longer any way to > define a hash in an inventory file now that yaml inventory files have > been > deprecated<https://groups.google.com/forum/#!msg/ansible-project/eBH5-OzMJqk/mbK3lPyk8tEJ>. > > Is my understanding correct here? > > I'm probably missing something but I can't see an idiomatic Ansible way of > doing this. Hence grateful for any tips. > > Cheers, > > Edd > -- 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.
