Skip to content

Commit

Permalink
install Zabbix 6.0 by default everywhere but EL7
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Oct 4, 2023
1 parent f22bc00 commit 0b5803e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@
if downcase($facts['kernel']) == 'windows' {
$zabbix_version = '4.4.5'
} else {
$zabbix_version = '5.0'
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '7' {
$zabbix_version = '5.0'
} else {
$zabbix_version = '6.0'
}
}

$manage_startup_script = downcase($facts['kernel']) ? {
Expand Down
6 changes: 3 additions & 3 deletions spec/classes/proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}
end

it { is_expected.to contain_class('zabbix::repo').with_zabbix_version('5.0') }
it { is_expected.to contain_class('zabbix::repo').with_zabbix_version('6.0') }
it { is_expected.to contain_package('zabbix-proxy-pgsql').with_require('Class[Zabbix::Repo]') }
it { is_expected.to contain_yumrepo('zabbix-nonsupported') }
it { is_expected.to contain_yumrepo('zabbix') }
Expand Down Expand Up @@ -106,7 +106,7 @@
end

it { is_expected.to contain_class('zabbix::database::postgresql').with_zabbix_type('proxy') }
it { is_expected.to contain_class('zabbix::database::postgresql').with_zabbix_version('5.0') }
it { is_expected.to contain_class('zabbix::database::postgresql').with_zabbix_version('6.0') }
it { is_expected.to contain_class('zabbix::database::postgresql').with_database_name('zabbix_proxy') }
it { is_expected.to contain_class('zabbix::database::postgresql').with_database_user('zabbix-proxy') }
it { is_expected.to contain_class('zabbix::database::postgresql').with_database_password('zabbix-proxy') }
Expand All @@ -126,7 +126,7 @@
end

it { is_expected.to contain_class('zabbix::database::mysql').with_zabbix_type('proxy') }
it { is_expected.to contain_class('zabbix::database::mysql').with_zabbix_version('5.0') }
it { is_expected.to contain_class('zabbix::database::mysql').with_zabbix_version('6.0') }
it { is_expected.to contain_class('zabbix::database::mysql').with_database_name('zabbix_proxy') }
it { is_expected.to contain_class('zabbix::database::mysql').with_database_user('zabbix-proxy') }
it { is_expected.to contain_class('zabbix::database::mysql').with_database_password('zabbix-proxy') }
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/sender_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
if %w[Archlinux Gentoo].include?(facts[:osfamily])
it { is_expected.not_to compile.with_all_deps }
else
it { is_expected.to contain_class('zabbix::repo').with_zabbix_version('5.0') }
it { is_expected.to contain_class('zabbix::repo').with_zabbix_version('6.0') }

Check failure on line 37 in spec/classes/sender_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

zabbix::sender on centos-7-x86_64 when declaring manage_repo is true is expected to contain Class[zabbix::repo] with zabbix_version => "6.0" Failure/Error: it { is_expected.to contain_class('zabbix::repo').with_zabbix_version('6.0') } expected that the catalogue would contain Class[zabbix::repo] with zabbix_version set to "6.0" but it is set to "5.0"
it { is_expected.to contain_package('zabbix-sender').with_require('Class[Zabbix::Repo]') }
end

Expand Down

0 comments on commit 0b5803e

Please sign in to comment.