https://github.com/robertdebock/ansible-role-zabbix_web
Install and configure zabbix_web on your system.
https://github.com/robertdebock/ansible-role-zabbix_web
ansible molecule monitoring playbook tox web zabbix
Last synced: 10 months ago
JSON representation
Install and configure zabbix_web on your system.
- Host: GitHub
- URL: https://github.com/robertdebock/ansible-role-zabbix_web
- Owner: robertdebock
- License: apache-2.0
- Created: 2018-12-21T05:59:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-08-01T15:46:18.000Z (11 months ago)
- Last Synced: 2025-08-28T14:19:35.531Z (10 months ago)
- Topics: ansible, molecule, monitoring, playbook, tox, web, zabbix
- Language: Jinja
- Homepage: https://robertdebock.nl/
- Size: 325 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# [Ansible role zabbix_web](#zabbix_web)
Install and configure zabbix_web on your system.
|GitHub|GitLab|Downloads|Version|
|------|------|---------|-------|
|[](https://github.com/robertdebock/ansible-role-zabbix_web/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-zabbix_web)|[](https://galaxy.ansible.com/robertdebock/zabbix_web)|[](https://github.com/robertdebock/ansible-role-zabbix_web/releases/)|
## [Example Playbook](#example-playbook)
This example is taken from [`molecule/default/converge.yml`](https://github.com/robertdebock/ansible-role-zabbix_web/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.
```yaml
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.zabbix_web
# You can provision Zabbix groups.
# Most options map directly to the documentation:
# https://docs.ansible.com/ansible/latest/modules/zabbix_group_module.html
zabbix_web_groups:
- name: Linux servers
# Add hosts to Zabbix.
# Most options map directly to the documentation:
# https://docs.ansible.com/ansible/latest/modules/zabbix_host_module.html
zabbix_web_hosts:
- name: Example server 1
interface_ip: "192.168.127.127"
interface_dns: server1.example.com
visible_name: Example server 1 name
description: Example server 1 description
groups:
- Linux servers
link_templates:
- Template OS Linux by Zabbix agent
```
The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/robertdebock/ansible-role-zabbix_web/blob/master/molecule/default/prepare.yml):
```yaml
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
- role: robertdebock.selinux
- role: robertdebock.container_docs
- role: robertdebock.buildtools
- role: robertdebock.epel
- role: robertdebock.python_pip
- role: robertdebock.openssl
openssl_items:
- name: apache-httpd
common_name: "{{ ansible_fqdn }}"
- role: robertdebock.mysql
mysql_databases:
- name: zabbix
encoding: utf8
collation: utf8_bin
mysql_users:
- name: zabbix
password: zabbix
priv: "zabbix.*:ALL"
- role: robertdebock.php
- role: robertdebock.httpd
- role: robertdebock.ca_certificates
- role: robertdebock.zabbix_repository
- role: robertdebock.core_dependencies
- role: robertdebock.zabbix_server
```
Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles.
## [Role Variables](#role-variables)
The default values for the variables are set in [`defaults/main.yml`](https://github.com/robertdebock/ansible-role-zabbix_web/blob/master/defaults/main.yml):
```yaml
---
# defaults file for zabbix_web
# How to connect to the mysql database, either `socket` or `network`.
zabbix_web_mysql_connection: socket
# Details to connect to the database.
zabbix_web_database_name: zabbix
zabbix_web_database_user: zabbix
zabbix_web_database_pass: zabbix
# When `zabbix_web_mysql_connection` is set to `network` this role needs
# these extra setting.
# zabbix_web_database_host: localhost
# zabbix_web_database_port: 3306
# Details to connect to Zabbix.
zabbix_web_server: "{{ ansible_fqdn }}"
zabbix_web_server_port: 10051
zabbix_web_server_name: zabbix
# Details to connect to the Zabbix API.
zabbix_web_username: Admin
zabbix_web_password: zabbix
zabbix_web_validate_certs: false
```
## [Requirements](#requirements)
- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-zabbix_web/blob/master/requirements.txt).
## [State of used roles](#state-of-used-roles)
The following roles are used to prepare a system. You can prepare your system in another way.
| Requirement | GitHub | GitLab |
|-------------|--------|--------|
|[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap)|
|[robertdebock.buildtools](https://galaxy.ansible.com/robertdebock/buildtools)|[](https://github.com/robertdebock/ansible-role-buildtools/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-buildtools)|
|[robertdebock.container_docs](https://galaxy.ansible.com/robertdebock/container_docs)|[](https://github.com/robertdebock/ansible-role-container_docs/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-container_docs)|
|[robertdebock.ca_certificates](https://galaxy.ansible.com/robertdebock/ca_certificates)|[](https://github.com/robertdebock/ansible-role-ca_certificates/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-ca_certificates)|
|[robertdebock.core_dependencies](https://galaxy.ansible.com/robertdebock/core_dependencies)|[](https://github.com/robertdebock/ansible-role-core_dependencies/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-core_dependencies)|
|[robertdebock.epel](https://galaxy.ansible.com/robertdebock/epel)|[](https://github.com/robertdebock/ansible-role-epel/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-epel)|
|[robertdebock.httpd](https://galaxy.ansible.com/robertdebock/httpd)|[](https://github.com/robertdebock/ansible-role-httpd/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-httpd)|
|[robertdebock.mysql](https://galaxy.ansible.com/robertdebock/mysql)|[](https://github.com/robertdebock/ansible-role-mysql/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-mysql)|
|[robertdebock.openssl](https://galaxy.ansible.com/robertdebock/openssl)|[](https://github.com/robertdebock/ansible-role-openssl/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-openssl)|
|[robertdebock.php](https://galaxy.ansible.com/robertdebock/php)|[](https://github.com/robertdebock/ansible-role-php/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-php)|
|[robertdebock.python_pip](https://galaxy.ansible.com/robertdebock/python_pip)|[](https://github.com/robertdebock/ansible-role-python_pip/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-python_pip)|
|[robertdebock.selinux](https://galaxy.ansible.com/robertdebock/selinux)|[](https://github.com/robertdebock/ansible-role-selinux/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-selinux)|
|[robertdebock.zabbix_repository](https://galaxy.ansible.com/robertdebock/zabbix_repository)|[](https://github.com/robertdebock/ansible-role-zabbix_repository/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-zabbix_repository)|
|[robertdebock.zabbix_server](https://galaxy.ansible.com/robertdebock/zabbix_server)|[](https://github.com/robertdebock/ansible-role-zabbix_server/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-zabbix_server)|
## [Context](#context)
This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information.
Here is an overview of related roles:

## [Compatibility](#compatibility)
This role has been tested on these [container images](https://hub.docker.com/u/robertdebock):
|container|tags|
|---------|----|
|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9|
|[Debian](https://hub.docker.com/r/robertdebock/debian)|bullseye|
|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|focal|
The minimum version of Ansible required is 2.12, tests have been done to:
- The previous version.
- The current version.
- The development version.
If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-zabbix_web/issues).
## [License](#license)
[Apache-2.0](https://github.com/robertdebock/ansible-role-zabbix_web/blob/master/LICENSE).
## [Author Information](#author-information)
[robertdebock](https://robertdebock.nl/)
Please consider [sponsoring me](https://github.com/sponsors/robertdebock).