From 772cee2a6e802d93d20b6900ca66ac5335210b11 Mon Sep 17 00:00:00 2001 From: Boris Tassou Date: Wed, 22 Mar 2023 10:42:32 +0100 Subject: [PATCH 1/2] Add Freebsd support for Zabbix Agent --- manifests/params.pp | 16 ++++++++++++++++ manifests/startup.pp | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index 0023e8e29..c0c9aacb2 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -71,6 +71,21 @@ $zabbix_package_provider = undef $agent_loadmodulepath = '/usr/lib/modules' } + 'FreeBSD': { + $manage_repo = false + $manage_choco = false + $zabbix_package_agent = 'zabbix6-agent' + $agent_configfile_path = '/usr/local/etc/zabbix6/zabbix_agentd.conf' + $agent_config_owner = 'zabbix' + $agent_zabbix_user = 'zabbix' + $agent_config_group = 'zabbix' + $agent_pidfile = '/var/run/zabbix/zabbix_agentd.pid' + $agent_servicename = 'zabbix_agentd' + $agent_include = '/usr/local/etc/zabbix6/zabbix_agentd.d' + $server_zabbix_user = 'zabbix' + $zabbix_package_provider = undef + $agent_loadmodulepath = '/usr/local/lib/zabbix/modules' + } 'Gentoo': { $server_fpinglocation = '/usr/sbin/fping' $server_fping6location = '/usr/sbin/fping6' @@ -135,6 +150,7 @@ $manage_startup_script = downcase($facts['kernel']) ? { 'windows' => false, + 'FreeBSD' => false, default => true, } diff --git a/manifests/startup.pp b/manifests/startup.pp index 8bd1c1ecf..7ca381142 100644 --- a/manifests/startup.pp +++ b/manifests/startup.pp @@ -76,6 +76,6 @@ notify => Service[$name], } } else { - fail('We currently only support Debian, Redhat, AIX and Windows osfamily as non-systemd') + fail('We currently only support Debian, FreeBSD, Redhat, AIX and Windows osfamily as non-systemd') } } From 52a33b1b7f24f82df029faf976fbb44b04cd6c62 Mon Sep 17 00:00:00 2001 From: Boris Tassou Date: Wed, 22 Mar 2023 10:43:39 +0100 Subject: [PATCH 2/2] Add Freebsd support for Zabbix Agent --- metadata.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/metadata.json b/metadata.json index b66785000..66fd26463 100644 --- a/metadata.json +++ b/metadata.json @@ -164,6 +164,12 @@ "operatingsystemrelease": [ "7" ] + }, + { + "operatingsystem": "FreeBSD", + "operatingsystemrelease": [ + "13" + ] } ] }