I'm interested if there are any Ansible modules for completely
(or as closely as possible) managing Zabbix. I'm aware of the
modules that come with Ansible, but they appear to be quite limited,
and only cover managing groups, hosts, and screens. I didn't find
anything that, for example, can configure items or alerts.
What I'm looking for is ideally a way to do all configuration with
Ansible rather than by the Zabbix GUI. In other words, the complete
Zabbix configuration would be managed by Ansible so that it would
be (relatively) trivial to backup and restore a Zabbix configuration.
you can use zabbix template module to manage templates, if you want to automate everything then you should try to not use items without templates, just add those items to templates, make as much templates you need, and then link host to needed templates.
we have much templates, and we have create in defaults/main.yml ansible group mapping to zabbix group mapping (as we have lots ansible groups, we don’t want to add them to zabbix all) also there is defined dict with default templates, and when some group needs to add more templates, you just merge those dict’s and that way you can manage ansible. don’t know what you need more
Good idea. I checked this, and there certainly are more modules there.
But I was hoping to learn what people are actually using for this
purpose rather than trying a bunch of modules of unknown quality.