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, another if I use production.
I've tried just putting a variable in the root of the inventory file qa:
inventory=qa
[webservers]
host1
but that doesn't work: is not displayed as a variable with: "ansible host1 -m setup -i qa"
I can define a variable for each host like:
[webservers]
host1 inventory=qa
but that is terribly redundant.
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e5606bef-1a43-40a1-b34a-42c0866cd9ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/258ac9c4-e8a5-4eb4-a229-7364e4990902%40googlegroups.com.