But looks like the variable file is referred to, before the
variable inventory_file is loaded?
I'm not sure what this means, can you elaborate?
Thanks!
On Mon, May 12, 2014 at 3:27 PM, Mridusmita Talukdar mridu...@gmail.comwrote:
Hi,
We have multiple clusters. Each of the clusters need to
Hi,
We have multiple clusters. Each of the clusters need to have a different
var file (cluster specific variables)
Currently the variable file name is same as the cluster name, so that when
the extra-variable says cluster=ABC, my playbook picks up the variable file
ABC.yml which I refer to in
As suggested in the best practices doc, have two inventory files: qa and
production
I call these using the -i parameter:
ansible-playbook -i qa ...
Is there a way I can determine in my playbook which inventory I am using?
The use case is I want to notify one chat room if using qa inventory,
The name of the current inventory file in use is stored in the
inventory_file variable name, so you could check that. Beyond that, there
are two other options:
1. Use --extra-vars to specify the target environment, for example:
--extra-vars=inventory=qa
2. The group_vars location is based on the