Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use os.family fact to detect params #913

Merged
merged 2 commits into from Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 2 additions & 21 deletions manifests/params.pp
@@ -1,8 +1,8 @@
# @summary This class manages zabbix server parameters
class zabbix::params {
# It seems that ubuntu has an different fping path...
case $facts['os']['name'] {
'Ubuntu', 'Debian' : {
case $facts['os']['family'] {
'Debian' : {
$server_fpinglocation = '/usr/bin/fping'
$server_fping6location = '/usr/bin/fping6'
$proxy_fpinglocation = '/usr/bin/fping'
Expand Down Expand Up @@ -52,25 +52,6 @@
$zabbix_package_provider = undef
$agent_loadmodulepath = '/usr/lib/modules'
}
'Fedora': {
$server_fpinglocation = '/usr/sbin/fping'
$server_fping6location = '/usr/sbin/fping6'
$proxy_fpinglocation = '/usr/sbin/fping'
$proxy_fping6location = '/usr/sbin/fping6'
$manage_repo = false
$manage_choco = false
$zabbix_package_agent = 'zabbix-agent'
$agent_configfile_path = '/etc/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-agent'
$agent_include = '/etc/zabbix/zabbix_agentd.d'
$server_zabbix_user = 'zabbix'
$zabbix_package_provider = undef
$agent_loadmodulepath = '/usr/lib/modules'
}
'FreeBSD': {
$manage_repo = false
$manage_choco = false
Expand Down
2 changes: 0 additions & 2 deletions spec/classes/agent_spec.rb
Expand Up @@ -17,8 +17,6 @@
on_supported_os(baseline_os_hash).each do |os, facts|
context "on #{os}" do
config_path = case facts[:os]['name']
when 'Fedora'
'/etc/zabbix_agentd.conf'
when 'windows'
'C:/ProgramData/zabbix/zabbix_agentd.conf'
else
Expand Down