From 636229286bff1f120079ada297d53677fa6d3a30 Mon Sep 17 00:00:00 2001
From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de>
Date: Tue, 23 Jul 2019 16:27:36 +0200
Subject: [PATCH] Update zabbix agent config for buster

With buster the path to zabbix agent config files changed from
/etc/zabbix/zabbix_agentd.d/ to /etc/zabbix/zabbix_agent.conf.d/.
Also, the log directory changed from /var/log/zabbix/ to
/var/log/zabbix_agent, but after this change the agent logs to stdout
(journald) instead.
---
 zabbix-agent/templates/zabbix_agentd.conf.j2 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/zabbix-agent/templates/zabbix_agentd.conf.j2 b/zabbix-agent/templates/zabbix_agentd.conf.j2
index 12400dd..c256784 100644
--- a/zabbix-agent/templates/zabbix_agentd.conf.j2
+++ b/zabbix-agent/templates/zabbix_agentd.conf.j2
@@ -20,7 +20,7 @@ PidFile=/var/run/zabbix/zabbix_agentd.pid
 #
 # Mandatory: no
 # Default:
-# LogType=file
+LogType=console
 
 ### Option: LogFile
 #	Log file name for LogType 'file' parameter.
@@ -29,7 +29,7 @@ PidFile=/var/run/zabbix/zabbix_agentd.pid
 # Default:
 # LogFile=
 
-LogFile=/var/log/zabbix/zabbix_agentd.log
+#LogFile=/var/log/zabbix/zabbix_agentd.log
 
 ### Option: LogFileSize
 #	Maximum size of log file in MB.
@@ -262,7 +262,11 @@ Hostname={{ ansible_fqdn }}
 # Default:
 # Include=
 
+{% if ansible_distribution_major_version is version("10", ">=") %}
+Include=/etc/zabbix/zabbix_agentd.conf.d/
+{% else %}
 Include=/etc/zabbix/zabbix_agentd.d/
+{% endif %}
 
 # Include=/usr/local/etc/zabbix_agentd.userparams.conf
 # Include=/usr/local/etc/zabbix_agentd.conf.d/
-- 
GitLab