Ansible role to install and configure the Zabbix Agent 2
Find a file
2025-04-16 19:11:59 +02:00
.gitlab feat: initial commit 2025-04-16 17:32:51 +02:00
defaults feat: initial commit 2025-04-16 17:32:51 +02:00
files/zabbix/plugins.d feat: disable nvidia plugin 2025-04-16 18:03:18 +02:00
handlers feat: initial commit 2025-04-16 17:32:51 +02:00
meta fix: remove role dependancy 2025-04-16 17:45:24 +02:00
tasks fix: zabbix-release package name for suse 2025-04-16 19:11:59 +02:00
templates feat: initial commit 2025-04-16 17:32:51 +02:00
vars feat: initial commit 2025-04-16 17:32:51 +02:00
.ansible-lint fix(ci): linter compliance 2025-04-16 17:34:58 +02:00
.gitignore feat: initial commit 2025-04-16 17:32:51 +02:00
.gitlab-ci.yml feat: initial commit 2025-04-16 17:32:51 +02:00
.yamllint feat: initial commit 2025-04-16 17:32:51 +02:00
README.md feat: initial commit 2025-04-16 17:32:51 +02:00
renovate.json feat: initial commit 2025-04-16 17:32:51 +02:00

Overview

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

Supported Operating Systems

Operating System Version
Debian 12
SLES 15
Ubuntu 22.04 LTS
Ubuntu 24.04 LTS

Variables

Variable Type Default Required
zabbix_proxy_address string Yes
zabbix_agent_hostinterface string inventory_hostname No
zabbix_agent_hostname string inventory_hostname No
zabbix_agent_psk_enable bool true No
zabbix_agent_psk_id string Yes
zabbix_agent_psk string(enc) Yes
zabbix_user_sudo bool true No

Example usage

With PSK:

zabbix_proxy_address: "proxy.monitor.localnet.internal"
zabbix_agent_psk_id: "client-psk"
zabbix_agent_psk: !vault
  $ANSIBLE_VAULT;1.1;AES256
  31633463613336373164373333633038393164383835646633303163316665303934646363383530
  ...

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

Tags Purpose
zabbix_agent Executes the whole playbook
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