Skip to content

Commit

Permalink
drop support for Zabbix 5.2 and 5.4 which are EOL upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Oct 3, 2023
1 parent 86a35ad commit 3db7a85
Show file tree
Hide file tree
Showing 17 changed files with 4 additions and 95 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ Take a look at the [REFERENCE.md](https://github.com/voxpupuli/puppet-zabbix/blo

## Limitations

This module supports Zabbix 4.0, 5.0, 5.2, 5.4 and 6.0. The upstream supported versions are documented [here](https://www.zabbix.com/de/life_cycle_and_release_policy)
This module supports Zabbix 4.0, 5.0, and 6.0. The upstream supported versions are documented [here](https://www.zabbix.com/life_cycle_and_release_policy)
Please have a look into the metadata.json for all supported operating systems.

This module is supported on both the community and the Enterprise version of Puppet.
Expand Down
8 changes: 1 addition & 7 deletions manifests/agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
# agent_configfile_path)
# @example Basic installation:
# class { 'zabbix::agent':
# zabbix_version => '5.2',
# zabbix_version => '6.0',
# server => '192.168.1.1',
# }
#
Expand Down Expand Up @@ -221,12 +221,6 @@
String $service_type = $zabbix::params::service_type,
Boolean $manage_startup_script = $zabbix::params::manage_startup_script,
) inherits zabbix::params {
if $facts['os']['family'] == 'Debian' and versioncmp($facts['os']['release']['major'], '11') == 0 {
if versioncmp($zabbix_version, '5.2') == 0 {
fail('Zabbix 5.2 is not supported on Debian 11!')
}
}

# Find if listenip is set. If not, we can set to specific ip or
# to network name. If more than 1 interfaces are available, we
# can find the ipaddress of this specific interface if listenip
Expand Down
2 changes: 1 addition & 1 deletion manifests/javagateway.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# @param timeout Number of worker threads to start.
# @example
# class { 'zabbix::javagateway':
# zabbix_version => '5.2',
# zabbix_version => '6.0',
# }
# @author Werner Dijkerman [email protected]
class zabbix::javagateway (
Expand Down
6 changes: 0 additions & 6 deletions manifests/proxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,6 @@
fail('Archlinux is currently not supported for zabbix::proxy ')
}

if $facts['os']['family'] == 'Debian' and versioncmp($facts['os']['release']['major'], '11') == 0 {
if versioncmp($zabbix_version, '5.2') == 0 {
fail('Zabbix 5.2 is not supported on Debian 11!')
}
}

# Find if listenip is set. If not, we can set to specific ip or
# to network name. If more than 1 interfaces are available, we
# can find the ipaddress of this specific interface if listenip
Expand Down
6 changes: 0 additions & 6 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,6 @@
}
}

if $facts['os']['family'] == 'Debian' and versioncmp($facts['os']['release']['major'], '11') == 0 {
if versioncmp($zabbix_version, '5.2') == 0 {
fail('Zabbix 5.2 is not supported on Debian 11!')
}
}

# Only include the repo class if it has not yet been included
unless defined(Class['Zabbix::Repo']) {
class { 'zabbix::repo':
Expand Down
6 changes: 0 additions & 6 deletions manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@
}
}

if $facts['os']['family'] == 'Debian' and versioncmp($facts['os']['release']['major'], '11') == 0 {
if versioncmp($zabbix_version, '5.2') == 0 {
fail('Zabbix 5.2 is not supported on Debian 11!')
}
}

# Only include the repo class if it has not yet been included
unless defined(Class['Zabbix::Repo']) {
class { 'zabbix::repo':
Expand Down
3 changes: 0 additions & 3 deletions spec/acceptance/agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
require 'spec_helper_acceptance'

supported_versions.each do |version|
# No Zabbix 5.2 packages on Debian 11
next if version == '5.2' && default[:platform] == 'debian-11-amd64'

describe "zabbix::agent class with zabbix_version #{version}" do
it 'works idempotently with no errors' do
pp = <<-EOS
Expand Down
4 changes: 0 additions & 4 deletions spec/acceptance/zabbix_application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@

describe 'zabbix_application type', unless: default[:platform] =~ %r{archlinux} do
supported_versions.each do |zabbix_version|
# 5.2 and 5.4 server packages are not available for RHEL 7
next if zabbix_version == '5.2' && default[:platform] == 'el-7-x86_64'
# Application API was removed in Zabbix 5.4
next if zabbix_version >= '5.4'
# No Zabbix 5.2 packages on Debian 11
next if zabbix_version == '5.2' && default[:platform] == 'debian-11-amd64'

template = case zabbix_version
when '4.0'
Expand Down
4 changes: 0 additions & 4 deletions spec/acceptance/zabbix_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
supported_versions.each do |zabbix_version|
# >= 5.2 server packages are not available for RHEL 7
next if zabbix_version >= '5.2' && default[:platform] == 'el-7-x86_64'
# No Zabbix 5.2 packages on Debian 11
next if zabbix_version == '5.2' && default[:platform] == 'debian-11-amd64'

context "create zabbix_host resources with zabbix version #{zabbix_version}" do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand All @@ -29,8 +27,6 @@
['Template OS Linux SNMPv2']
when '5.0'
['Template OS Linux SNMP']
when '5.2', '5.4'
['Linux SNMP']
else
['Linux by SNMP']
end
Expand Down
2 changes: 0 additions & 2 deletions spec/acceptance/zabbix_hostgroup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
supported_versions.each do |zabbix_version|
# >= 5.2 server packages are not available for RHEL 7
next if zabbix_version >= '5.2' && default[:platform] == 'el-7-x86_64'
# No Zabbix 5.2 packages on Debian 11
next if zabbix_version == '5.2' && default[:platform] == 'debian-11-amd64'

context "create zabbix_hostgroup resources with zabbix version #{zabbix_version}" do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand Down
2 changes: 0 additions & 2 deletions spec/acceptance/zabbix_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
supported_versions.each do |zabbix_version|
# >= 5.2 server packages are not available for RHEL 7
next if zabbix_version >= '5.2' && default[:platform] == 'el-7-x86_64'
# No Zabbix 5.2 packages on Debian 11
next if zabbix_version == '5.2' && default[:platform] == 'debian-11-amd64'

context "create zabbix_proxy resources with zabbix version #{zabbix_version}" do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand Down
2 changes: 0 additions & 2 deletions spec/acceptance/zabbix_template_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
next if zabbix_version == '6.0'
# >= 5.2 server packages are not available for RHEL 7
next if zabbix_version >= '5.2' && default[:platform] == 'el-7-x86_64'
# No Zabbix 5.2 packages on Debian 11
next if zabbix_version == '5.2' && default[:platform] == 'debian-11-amd64'

context "create zabbix_template_host resources with zabbix version #{zabbix_version}" do
template = case zabbix_version
Expand Down
2 changes: 0 additions & 2 deletions spec/acceptance/zabbix_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
supported_versions.each do |zabbix_version|
# >= 5.2 server packages are not available for RHEL 7
next if zabbix_version >= '5.2' && default[:platform] == 'el-7-x86_64'
# No Zabbix 5.2 packages on Debian 11
next if zabbix_version == '5.2' && default[:platform] == 'debian-11-amd64'

context "create zabbix_template resources with zabbix version #{zabbix_version}" do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand Down
15 changes: 0 additions & 15 deletions spec/classes/proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -437,21 +437,6 @@
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^LogFileSize=10$} }
end
end

describe 'with zabbix_version 5.2 and Vault parameters defined' do
let :params do
{
zabbix_version: '5.2',
vaultdbpath: 'secret/zabbix/database',
vaulttoken: 'FKTYPEGL156DK',
vaulturl: 'https://127.0.0.1:8200',
}
end

it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^VaultDBPath=secret/zabbix/database$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^VaultToken=FKTYPEGL156DK$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^VaultURL=https://127.0.0.1:8200$} }
end
end
end
end
Expand Down
31 changes: 0 additions & 31 deletions spec/classes/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -392,37 +392,6 @@
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^LogFileSize=10$} }
end
end

# Zabbix Server 5.2 is not supported on RedHat family and Debian 11
if facts[:osfamily] != 'RedHat' && facts[:os]['release']['major'] != '11'
describe 'with zabbix_version 5.2 and Vault parameters defined' do
let :params do
{
zabbix_version: '5.2',
vaultdbpath: 'secret/zabbix/database',
vaulttoken: 'FKTYPEGL156DK',
vaulturl: 'https://127.0.0.1:8200',
}
end

it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^VaultDBPath=secret/zabbix/database$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^VaultToken=FKTYPEGL156DK$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^VaultURL=https://127.0.0.1:8200$} }
end

describe 'with zabbix_version 5.4 and report parameters defined' do
let :params do
{
zabbix_version: '5.4',
startreportwriters: 1,
webserviceurl: 'http://localhost:10053/report',
}
end

it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^StartReportWriters=1} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^WebServiceURL=http://localhost:10053/report} }
end
end
end
end
end
2 changes: 0 additions & 2 deletions spec/classes/web_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
next if facts[:os]['name'] == 'windows'
next if facts[:os]['name'] == 'Archlinux'
next if facts[:os]['name'] == 'Gentoo'
# There are no zabbix 5.2 packages for Debian 11
next if facts[:os]['name'] == 'Debian' && facts[:os]['release']['major'] == '11' && zabbix_version == '5.2'

context "on #{os}" do
let :facts do
Expand Down
2 changes: 1 addition & 1 deletion spec/support/acceptance/supported_versions.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

def supported_versions
%w[4.0 5.0 5.2 5.4 6.0]
%w[4.0 5.0 6.0]
end

0 comments on commit 3db7a85

Please sign in to comment.