Re: [ansible-project] How to handle dynamic inventories with playbooks

2015-06-04 Thread benno joy
you could just have - hosts: all and call the playbook via --limit stagec-webs, or let your script read a parameter from a file or environement variable which specifies the environment you want the inventory to be generated and only generate the inventory for that specific environment. - Benno O

[ansible-project] How to handle dynamic inventories with playbooks

2015-06-04 Thread Samnang Sen
We pull our server inventory from a Netscaler. Servers that are binded to a specific LB group is considered active and we deploy code and/or restart services at when needed. I've written a Python script that outputs the hosts into JSON format for Ansible to work with. This works fine except I'm