SkillAgentSearch skills...

Community.zabbix

Zabbix Ansible modules

Install / Use

/learn @ansible-collections/Community.zabbix
About this skill

Quality Score

0/100

Category

Operations

Supported Platforms

Universal

README

Zabbix collection for Ansible

Plugins:

plugins repo-sanity

Roles:

Zabbix Agent Zabbix Server Zabbix Proxy Zabbix Web Zabbix Javagateway

Table of Contents

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

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:

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.1.1
  - 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
      zabbix_agent_server: zabbix.example.com
      ...

- name: If Zabbix WebUI runs on non-default (zabbix) path, e.g. http://<FQDN>/zabbixeu
  ansible.builtin.set_fact:
    ansible_zabbix_url_path: 'zabbixeu'

- name: Using Zabbix collection to manage Zabbix Server's elements with username/password
  hosts: zabbix.example.com
  vars:
    ansible_network_os: community.zabbix.zabbix
    ansible_connection: httpapi
    ansible_httpapi_port: 80
    ansible_httpapi_use_ssl: false  # Set to true for HTTPS
    ansible_httpapi_validate_certs: false  # For HTTPS et to true to validate server's certificate
    ansible_user: Admin
    ansible_httpapi_pass: 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:
    ansible_network_os: community.zabbix.zabbix
    ansible_connection: httpapi
    ansible_httpapi_port: 80
    ansible_httpapi_use_ssl: false  # Set to true for HTTPS
    ansible_httpapi_validate_certs: false  # For HTTPS set to true to validate se
View on GitHub
GitHub Stars398
CategoryOperations
Updated13d ago
Forks337

Languages

Python

Security Score

85/100

Audited on Mar 17, 2026

No findings