Managing Zabbix Using Ansible?

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.

Cordially,
Jon Forrest

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 :slight_smile:

there is some work started to more modules, but in quick look it’s abadoned for 1y https://github.com/pivno/ansible-zabbix-modules

in a way you can make your modules if youre interested in extending functionality.

Have you check out the roles in Galaxy, maybe there are some more complete solutions there
https://galaxy.ansible.com/list#/roles

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.

Jon

In Galaxy you can download roles not modules.

You CAN have modules (and other plugins) in the roles though.