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

Drop EoL Ubuntu 16.04 #833

Merged
merged 1 commit into from
Aug 10, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
# 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 {
if versioncmp($facts['os']['release']['major'], '9') == 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it also drop Debian 9, which we also consider unsupported in Vox Pupuli modules.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did like to drop it on another PR

fail("${facts['os']['family']} ${$facts['os']['release']['major']} is not supported for zabbix::web")
}
}
Expand Down Expand Up @@ -227,29 +227,7 @@
case $facts['os']['name'] {
'ubuntu', 'debian': {
$zabbix_web_package = 'zabbix-frontend-php'

# Check OS release for proper prefix
case $facts['os']['name'] {
'Ubuntu': {
if versioncmp($facts['os']['release']['major'], '16.04') >= 0 {
$php_db_package = "php-${db}"
}
else {
$php_db_package = "php5-${db}"
}
}
'Debian': {
if versioncmp($facts['os']['release']['major'], '9') >= 0 {
$php_db_package = "php-${db}"
}
else {
$php_db_package = "php5-${db}"
}
}
default: {
$php_db_package = "php5-${db}"
}
}
$php_db_package = "php-${db}"

package { $php_db_package:
ensure => $zabbix_package_state,
Expand Down
1 change: 0 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"16.04",
"18.04",
"20.04"
]
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 @@ -3,7 +3,7 @@
require 'spec_helper_acceptance'
require 'serverspec_type_zabbixapi'

describe 'zabbix_application type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|archlinux)} do
describe 'zabbix_application type', unless: default[:platform] =~ %r{(debian-9|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'
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 @@ -4,7 +4,7 @@
require 'serverspec_type_zabbixapi'

# rubocop:disable RSpec/LetBeforeExamples
describe 'zabbix_host type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|archlinux)} do
describe 'zabbix_host type', unless: default[:platform] =~ %r{(debian-9|archlinux)} do
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'
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 @@ -3,7 +3,7 @@
require 'spec_helper_acceptance'
require 'serverspec_type_zabbixapi'

describe 'zabbix_hostgroup type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|archlinux)} do
describe 'zabbix_hostgroup type', unless: default[:platform] =~ %r{(debian-9|archlinux)} do
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'
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 @@ -4,7 +4,7 @@
require 'serverspec_type_zabbixapi'

# rubocop:disable RSpec/LetBeforeExamples
describe 'zabbix_proxy type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|archlinux)} do
describe 'zabbix_proxy type', unless: default[:platform] =~ %r{(debian-9|archlinux)} do
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'
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 @@ -3,7 +3,7 @@
require 'spec_helper_acceptance'
require 'serverspec_type_zabbixapi'

describe 'zabbix_template_host type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|archlinux)} do
describe 'zabbix_template_host type', unless: default[:platform] =~ %r{(debian-9|archlinux)} do
supported_versions.each do |zabbix_version|
# Zabbix 6.0 removed the ability to attach templates directly to hosts.
next if zabbix_version == '6.0'
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 @@ -3,7 +3,7 @@
require 'spec_helper_acceptance'
require 'serverspec_type_zabbixapi'

describe 'zabbix_template type', unless: default[:platform] =~ %r{(ubuntu-16.04|debian-9|archlinux)} do
describe 'zabbix_template type', unless: default[:platform] =~ %r{(debian-9|archlinux)} do
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'
Expand Down
22 changes: 0 additions & 22 deletions spec/classes/repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,6 @@

it { is_expected.to contain_apt__source('zabbix').with_location('http://repo.zabbix.com/zabbix/5.0/debian/') }
end
when '16.04'
context 'on Ubuntu 14.04 and Zabbix 5.0' do
let :params do
{
zabbix_version: '5.0',
manage_repo: true
}
end

it { is_expected.to contain_apt__source('zabbix').with_location('http://repo.zabbix.com/zabbix/5.0/ubuntu/') }
end

context 'on Ubuntu 16.04 and Zabbix 4.0' do
let :params do
{
zabbix_version: '4.0',
manage_repo: true
}
end

it { is_expected.to contain_apt__source('zabbix').with_location('http://repo.zabbix.com/zabbix/4.0/ubuntu/') }
end
end
when 'RedHat'

Expand Down
35 changes: 2 additions & 33 deletions spec/classes/web_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
next if facts[:os]['name'] == 'Archlinux'
next if facts[:os]['name'] == 'Gentoo'
next if facts[:os]['name'] == 'Debian' && facts[:os]['release']['major'] == '9'
next if facts[:os]['name'] == 'Ubuntu' && facts[:os]['release']['major'] == '16.04'
# 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'

Expand Down Expand Up @@ -64,22 +63,7 @@
super().merge(zabbix_version: zabbix_version)
end

pgsqlpackage = case facts[:operatingsystem]
when 'Ubuntu'
if facts[:operatingsystemmajrelease] >= '16.04'
'php-pgsql'
else
'php5-pgsql'
end
when 'Debian'
if facts[:operatingsystemmajrelease].to_i >= 9
'php-pgsql'
else
'php5-pgsql'
end
else
'php5-pgsql'
end
pgsqlpackage = 'php-pgsql'

packages = if facts[:osfamily] == 'RedHat'
if facts[:operatingsystemmajrelease].to_i == 7 &&
Expand All @@ -104,22 +88,7 @@
super().merge(database_type: 'mysql')
end

mysqlpackage = case facts[:operatingsystem]
when 'Ubuntu'
if facts[:operatingsystemmajrelease] >= '16.04'
'php-mysql'
else
'php5-mysql'
end
when 'Debian'
if facts[:operatingsystemmajrelease].to_i >= 9
'php-mysql'
else
'php5-mysql'
end
else
'php5-mysql'
end
mysqlpackage = 'php-mysql'

packages = facts[:osfamily] == 'RedHat' ? %w[zabbix-web-mysql zabbix-web] : ['zabbix-frontend-php', mysqlpackage]
packages.each do |package|
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def baseline_os_hash
},
{
'operatingsystem' => 'Ubuntu',
'operatingsystemrelease' => %w[16.04 18.04 20.04]
'operatingsystemrelease' => %w[18.04 20.04]
},
{
'operatingsystem' => 'Archlinux',
Expand Down