ansible-collections
community.zabbix
Python

Zabbix Ansible modules

Last updated Jul 7, 2026
406
Stars
336
Forks
45
Issues
0
Stars/day
Attention Score
89
Language breakdown
Python 93.0%
Jinja 7.0%
Files click to expand
README

Zabbix collection for Ansible

Plugins:

plugins repo-sanity

Roles:

Zabbix Agent Zabbix Server Zabbix Proxy Zabbix Web Zabbix Javagateway

Table of Contents

* Introduction * Communication * Included content * Installation + Requirements + Installing the Collection from Ansible Galaxy * Usage * Supported Zabbix versions * Collection life cycle and support * Contributing * License

Introduction

This repo hosts the community.zabbix Ansible Collection.

The collection includes a variety of Ansible content to help automate the management of resources in Zabbix.

Communication

  • Join the Ansible forum:
* Get Help: get help or help others. * Posts tagged with 'zabbix': subscribe to participate in collection-related conversations. * Social Spaces: gather and interact with fellow enthusiasts. * News & Announcements: track project-wide announcements including social events. For more information about communication, see the Ansible communication guide.

Included content

Click on the name of a plugin or module to view that content's documentation:

- Inventory Sources: - zabbix - Zabbix Inventory Script - zabbixinventory - Zabbix Ansible Inventory Plugin - Modules: - zabbixaction - zabbixauthentication - zabbixautoregister - zabbixdiscoveryrule - zabbixglobalmacro - zabbixgroupinfo - zabbixgroupeventsinfo - zabbixgroup - zabbixhosteventsinfo - zabbixhostinfo - zabbixhost - zabbixhostmacro - zabbixhousekeeping - zabbixmaintenance - zabbixmap - zabbixmediatype - zabbixproxyinfo - zabbixproxy - zabbixscreen - zabbixscript - zabbixservice - zabbixtemplateinfo - zabbixtemplate - zabbixuserinfo - zabbixuser - zabbixusergroup - zabbixvaluemap - Roles: - zabbixagent - zabbixjavagateway - zabbixproxy - zabbixserver - zabbixweb

Installation

Requirements

Some of the components in this collection requires additional dependencies. Review components you are interested in by visiting links present in the Included content section.

While the various roles and modules may work with earlier versions of Python and Ansible, they are only tested and maintained against Ansible Core >= 2.16 and python >= 3.9

External Collections

Additional collections may be required when running the various roles.

  • ansible.posix: Required if using SELinux portion of any roles
  • ansible.general: Required if using SELinux portion of any roles
  • ansible.netcommon: Required when using the agent role
  • community.mysql: Required for the proxy or server roles if using MySQL
  • community.postgresql: Required for the proxy or server roles if using PostgreSQL
  • community.windows: Required for the agent role if installing on Windows
ansible-galaxy collection install ansible.posix
ansible-galaxy collection install community.general
ansible-galaxy collection install ansible.netcommon

Installing the Collection from Ansible Galaxy

Before using the Zabbix collection, you need to install it with the Ansible Galaxy CLI:

ansible-galaxy collection install community.zabbix

You can also include it in a requirements.yml file along with other required collections and install them via ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: community.zabbix
    version: 4.2.0
  - name: ansible.posix
    version: 1.3.0
  - name: community.general
    version: 3.7.0

Usage

Please note that these are not working examples. For documentation on how to use content included in this collection, refer to the links in the Included content section.

To use a module or role from this collection, reference them with their Fully Qualified Collection Namespace (FQCN) like so:

---
  • name: Using Zabbix collection to install Zabbix Agent
hosts: localhost roles: - role: community.zabbix.zabbix_agent zabbixagentserver: zabbix.example.com ...
  • name: If Zabbix WebUI runs on non-default (zabbix) path, e.g. http://<FQDN>/zabbixeu
ansible.builtin.set_fact: ansiblezabbixurl_path: 'zabbixeu'
  • name: Using Zabbix collection to manage Zabbix Server's elements with username/password
hosts: zabbix.example.com vars: ansiblenetworkos: community.zabbix.zabbix ansible_connection: httpapi ansiblehttpapiport: 80 ansiblehttpapiuse_ssl: false # Set to true for HTTPS ansiblehttpapivalidate_certs: false # For HTTPS et to true to validate server's certificate ansible_user: Admin ansiblehttpapipass: zabbix tasks: - name: Ensure host is monitored by Zabbix community.zabbix.zabbix_host: ...
  • name: Using Zabbix collection to manage Zabbix Server's elements with authentication key
hosts: zabbix.example.net vars: ansiblenetworkos: community.zabbix.zabbix ansible_connection: httpapi ansiblehttpapiport: 80 ansiblehttpapiuse_ssl: false # Set to true for HTTPS ansiblehttpapivalidate_certs: false # For HTTPS set to true to validate server's certificate ansiblezabbixauth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895 tasks: - name: Ensure host is monitored by Zabbix community.zabbix.zabbix_host: ...

Or you include collection name community.zabbix in the playbook's collections element, like this:

---
  • name: Using Zabbix collection
hosts: localhost collections: - community.zabbix

roles: - role: zabbix_agent zabbixagentserver: zabbix.example.com ...

  • name: Using Zabbix collection to manage Zabbix Server's elements with username/password
hosts: zabbix.example.com vars: ansiblenetworkos: community.zabbix.zabbix ansible_connection: httpapi ansiblehttpapiport: 80 ansiblehttpapiuse_ssl: false # Set to true for HTTPS ansiblehttpapivalidate_certs: false # For HTTPS et to true to validate server's certificate ansible_user: Admin ansiblehttpapipass: zabbix tasks: - name: Ensure host is monitored by Zabbix zabbix.zabbix_host: ...
  • name: Using Zabbix collection to manage Zabbix Server's elements with authentication key
hosts: zabbix.example.net vars: ansiblenetworkos: community.zabbix.zabbix ansible_connection: httpapi ansiblehttpapiport: 80 ansiblehttpapiuse_ssl: false # Set to true for HTTPS ansiblehttpapivalidate_certs: false # For HTTPS et to true to validate server's certificate ansiblezabbixauth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895 tasks: - name: Ensure host is monitored by Zabbix community.zabbix.zabbix_host: ...

If Basic Authentication is required to access Zabbix server add following variables:

zabbixapihttp_user: "user" zabbixapihttp_password: "password"

Supported Zabbix versions

Main priority is to support Zabbix releases which have official full support from Zabbix LLC. Please checkout the versions at Zabbix Life Cycle & Release Policy page.

Support for Zabbix LTS versions will be dropped with Major releases of the collection and mostly affect modules. Each role is following its unique support matrix. You should always consult documentation of roles in docs/ directory.

If you find any inconsistencies with the version of Zabbix you are using, feel free to open a pull request or an issue and we will try to address it as soon as possible. In case of pull requests, please make sure that your changes will not break any existing functionality for currently supported Zabbix releases.

Collection life cycle and support

See RELEASE document for more information regarding life cycle and support for the collection.

Contributing

See CONTRIBUTING for more information about how to contribute to this repository.

Please also feel free to stop by our Gitter community.

License

GNU General Public License v3.0 or later

See LICENSE to see the full text.

🔗 More in this category

© 2026 GitRepoTrend · ansible-collections/community.zabbix · Updated daily from GitHub