From 007b5272514c0806591290dedbba21415f4533cc Mon Sep 17 00:00:00 2001 From: Olivier van der Toorn Date: Tue, 4 Sep 2018 14:45:09 +0200 Subject: [PATCH] Add Gentoo variables The agent service name is now defined in the params.pp as well. Add Gentoo without version to metadata.json. --- manifests/agent.pp | 3 ++- manifests/params.pp | 19 +++++++++++++++++++ metadata.json | 3 +++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/manifests/agent.pp b/manifests/agent.pp index c5d632d73..3b705a7b9 100644 --- a/manifests/agent.pp +++ b/manifests/agent.pp @@ -215,6 +215,7 @@ $zbx_templates = $zabbix::params::agent_zbx_templates, $agent_configfile_path = $zabbix::params::agent_configfile_path, $pidfile = $zabbix::params::agent_pidfile, + $servicename = $zabbix::params::agent_servicename, String $logtype = $zabbix::params::agent_logtype, Optional[Stdlib::Absolutepath] $logfile = $zabbix::params::agent_logfile, $logfilesize = $zabbix::params::agent_logfilesize, @@ -339,7 +340,7 @@ } # Ensure that the correct config file is used. - zabbix::startup {'zabbix-agent': + zabbix::startup {$servicename: pidfile => $pidfile, agent_configfile_path => $agent_configfile_path, zabbix_user => $zabbix_user, diff --git a/manifests/params.pp b/manifests/params.pp index 56cd6e647..b33fe0214 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -25,6 +25,7 @@ $agent_zabbix_user = 'zabbix' $agent_config_group = 'zabbix' $agent_pidfile = '/var/run/zabbix/zabbix_agentd.pid' + $agent_servicename = 'zabbix-agent' $server_zabbix_user = 'zabbix' } 'Archlinux': { @@ -39,6 +40,7 @@ $agent_zabbix_user = 'zabbix-agent' $agent_config_group = 'zabbix-agent' $agent_pidfile = undef + $agent_servicename = 'zabbix-agent' $server_zabbix_user = 'zabbix-server' } 'Fedora': { @@ -53,6 +55,22 @@ $agent_zabbix_user = 'zabbix' $agent_config_group = 'zabbix' $agent_pidfile = '/var/run/zabbix/zabbix_agentd.pid' + $agent_servicename = 'zabbix-agent' + $server_zabbix_user = 'zabbix' + } + 'Gentoo': { + $server_fpinglocation = '/usr/sbin/fping' + $server_fping6location = '/usr/sbin/fping6' + $proxy_fpinglocation = '/usr/sbin/fping' + $proxy_fping6location = '/usr/sbin/fping6' + $manage_repo = false + $zabbix_package_agent = 'zabbix' + $agent_configfile_path = '/etc/zabbix/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' $server_zabbix_user = 'zabbix' } default : { @@ -67,6 +85,7 @@ $agent_zabbix_user = 'zabbix' $agent_config_group = 'zabbix' $agent_pidfile = '/var/run/zabbix/zabbix_agentd.pid' + $agent_servicename = 'zabbix-agent' $server_zabbix_user = 'zabbix' } } diff --git a/metadata.json b/metadata.json index fc12464bd..916457b82 100644 --- a/metadata.json +++ b/metadata.json @@ -143,6 +143,9 @@ }, { "operatingsystem": "Archlinux" + }, + { + "operatingsystem": "Gentoo" } ] }