Ansible role to install and configure the Zabbix Agent 2
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Simon Cornet 57d1d93918
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
docs: improved readability
2026-07-16 15:05:43 +02:00
.woodpecker chore(package): update cr.simoncor.net/dockerhub/davidanson/markdownlint-cli2 docker tag to v0.23.0 2026-07-01 07:33:57 +00:00
defaults feat: test attempt 2 2025-10-03 11:07:26 +02:00
files/zabbix/plugins.d feat: test attempt 2 2025-10-03 11:07:26 +02:00
handlers feat: test attempt 2 2025-10-03 11:07:26 +02:00
meta feat: move deps to playbook 2026-05-08 15:44:27 +02:00
roles fix: add missing zabbix_prereq 2026-06-15 17:08:17 +02:00
tasks chore: migrate bare ansible_* facts to ansible_facts[] syntax 2026-05-19 09:19:08 +02:00
templates feat: test attempt 2 2025-10-03 11:07:26 +02:00
.ansible-lint fix: exclude only sops yml files from lint 2026-07-14 16:24:02 +02:00
.editorconfig chore: add .editorconfig and .gitattributes 2026-05-27 14:24:08 +02:00
.gitattributes chore: add .editorconfig and .gitattributes 2026-05-27 14:24:08 +02:00
.gitignore feat: initial commit 2025-04-16 17:32:51 +02:00
.markdownlint-cli2.jsonc style: ignore line length for markdown tables 2026-05-15 13:44:06 +02:00
.sops.yaml fix: correct sops regex to ya?ml 2026-07-14 16:02:09 +02:00
.yamllint chore: exclude .yml files from lint configs 2026-07-14 16:17:45 +02:00
AGENTS.md style: align markdown table formatting for MD060 compliance 2026-05-18 18:26:21 +02:00
ansible.cfg chore: sync linting and config files from common 2026-07-14 11:33:16 +02:00
playbook.yaml feat: move deps to playbook 2026-05-08 15:44:27 +02:00
readme.md docs: improved readability 2026-07-16 15:05:43 +02:00
renovate.json fix(ci): use central config 2025-06-17 17:58:22 +02:00

Overview

This role the installation and configuration of the Zabbix Agent version 2.

Supported Operating Systems

Operating System Version
Alpine 3.23
Debian 13
SLES 15
Ubuntu 24.04 LTS

Variables

Variable Type Default Required
zabbix_agent_hostinterface string inventory_hostname No
zabbix_agent_hostname string inventory_hostname No
zabbix_agent_listen_port string 10050 No
zabbix_agent_psk_enable bool true No
zabbix_agent_psk_id string Yes*
zabbix_agent_psk string(enc) Yes*
zabbix_proxy_address string shared.proxy.monitor.itcreation.tools No
zabbix_proxy_port string 10051 No
zabbix_user_sudo bool true No
  • Only if zabbix_agent_psk_enable is set to true.

Example usage

With PSK:

zabbix_proxy_address: "proxy.monitor.localnet.internal"
zabbix_agent_psk_id: "client-psk"
zabbix_proxy_psk: "supersecretpsk"
  ...

Without PSK:

zabbix_proxy_address: "proxy.monitor.localnet.internal"

DNS override

If DNS is complicated or permanently broken for some reason. We can override the hostname and hostinterface.
The hostname is the visible name in Zabbix.
The hostinterface is what Zabbix uses to connect to the host.

zabbix_agent_hostname: "server.example.com"
zabbix_agent_hostinterface: "192.168.10.10"

This is possible, but please only use if really required.

Tags

If you call the role without tags, it will execute all of the stages bellow.

Tags Purpose
zabbix_agent_config Only manage Zabbix Agent 2 configuration
zabbix_agent_install Only manage Zabbix Agent 2 installation
zabbix_agent_prereq Only manage Zabbix Agent 2 prerequisites