Skip to content

Commit

Permalink
zabbix-frontend 5.x is not available for stretch and xenial
Browse files Browse the repository at this point in the history
Signed-off-by: Christos Papageorgiou <[email protected]>
  • Loading branch information
root-expert committed Feb 28, 2021
1 parent 6db12ea commit 7967056
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
10 changes: 9 additions & 1 deletion manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@
fail("${facts['os']['family']} is currently not supported for zabbix::web")
}

# zabbix frontend 5.x is not supported, among others, on stretch and xenial.
# https://www.zabbix.com/documentation/current/manual/installation/frontend/frontend_on_debian
if $facts['os']['name'] in ['ubuntu', 'debian'] and versioncmp($zabbix_version, '5') >= 0 {
if versioncmp($facts['os']['release']['major'], '16.04') == 0 or versioncmp($facts['os']['release']['major'], '9') == 0 {
fail("${facts['os']['family']} ${$facts['os']['release']['major']} is not supported for zabbix::web")
}
}

# Only include the repo class if it has not yet been included
unless defined(Class['Zabbix::Repo']) {
class { 'zabbix::repo':
Expand Down Expand Up @@ -348,7 +356,7 @@
}
'CentOS', 'RedHat': {
$zabbix_web_package = 'zabbix-web'
if ($facts['os']['release']['major'] == '7' and versioncmp($zabbix_version, '5') > 0) {
if ($facts['os']['release']['major'] == '7' and versioncmp($zabbix_version, '5') >= 0) {
package { 'zabbix-required-scl-repo':
ensure => 'latest',
name => 'centos-release-scl',
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'serverspec_type_zabbixapi'

# rubocop:disable RSpec/LetBeforeExamples
describe 'zabbix_application type', unless: default[:platform] =~ %r{debian-10-amd64} do
describe 'zabbix_application type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|debian-10)-amd64} do
context 'create zabbix_application resources' do
# This will deploy a running Zabbix setup (server, web, db) which we can
# use for custom type tests
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'serverspec_type_zabbixapi'

# rubocop:disable RSpec/LetBeforeExamples
describe 'zabbix_host type', unless: default[:platform] =~ %r{debian-10-amd64} do
describe 'zabbix_host type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|debian-10)-amd64} do
context 'create zabbix_host resources' do
# This will deploy a running Zabbix setup (server, web, db) which we can
# use for custom type tests
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_hostgroup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'serverspec_type_zabbixapi'

# rubocop:disable RSpec/LetBeforeExamples
describe 'zabbix_hostgroup type', unless: default[:platform] =~ %r{debian-10-amd64} do
describe 'zabbix_hostgroup type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|debian-10)-amd64} do
context 'create zabbix_hostgroup resources' do
it 'runs successfully' do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'serverspec_type_zabbixapi'

# rubocop:disable RSpec/LetBeforeExamples
describe 'zabbix_proxy type', unless: default[:platform] =~ %r{debian-10-amd64} do
describe 'zabbix_proxy type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|debian-10)-amd64} do
context 'create zabbix_proxy resources' do
# This will deploy a running Zabbix setup (server, web, db) which we can
# use for custom type tests
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_template_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'serverspec_type_zabbixapi'

# rubocop:disable RSpec/LetBeforeExamples
describe 'zabbix_template_host type', unless: default[:platform] =~ %r{debian-10-amd64} do
describe 'zabbix_template_host type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|debian-10)-amd64} do
context 'create zabbix_template_host resources' do
it 'runs successfully' do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'serverspec_type_zabbixapi'

# rubocop:disable RSpec/LetBeforeExamples
describe 'zabbix_template type', unless: default[:platform] =~ %r{debian-10-amd64} do
describe 'zabbix_template type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|debian-10)-amd64} do
context 'create zabbix_template resources' do
it 'runs successfully' do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand Down

0 comments on commit 7967056

Please sign in to comment.