I have a lot of VMs set up by hands during years, so each VM is a bit unique (so to say, you know). Zabbix agents on these VMs are of different versions and maybe differently configured.
The idea is to use Ansible to install commonly configured Zabbix agents on all of these VMs. Now I'd like to fill Ansible inventory with hosts from Zabbix server host list - and it would be pretty good idea to use this host list dynamically.
So the question is, if I can use Zabbix host list instead of "-i host" list and do that in some standard way?
I can find this but I can't figure out how to use it in my case. And most Google queries for "Ansible over Zabbix server host list" entries are about setting up Zabbix server or agents with Ansible, not about dynamic host list.
All I can imagine is to create host list statically with SQL query to Zabbix DB (or Zabbix API) but this seems to be "my own buggy way" to do thing which is already done by someone.
Please advice or maybe give some example!