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

remove more Zabbix 5.4 special cases now that it's unsupported #890

Merged
merged 1 commit into from
Oct 4, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions manifests/database/mysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
if ($database_schema_path == false) or ($database_schema_path == '') {
if versioncmp($zabbix_version, '6.0') >= 0 {
$schema_path = '/usr/share/zabbix-sql-scripts/mysql/'
} elsif versioncmp($zabbix_version, '5.4') >= 0 {
$schema_path = '/usr/share/doc/zabbix-sql-scripts/mysql/'
} else {
$schema_path = '/usr/share/doc/zabbix-*-mysql*'
}
Expand Down
4 changes: 0 additions & 4 deletions manifests/database/postgresql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,12 @@
if member(['CentOS', 'RedHat', 'OracleLinux', 'VirtuozzoLinux'], $facts['os']['name']) {
if versioncmp($zabbix_version, '6.0') >= 0 {
$schema_path = '/usr/share/zabbix-sql-scripts/postgresql/'
} elsif versioncmp($zabbix_version, '5.4') >= 0 {
$schema_path = '/usr/share/doc/zabbix-sql-scripts/postgresql/'
} else {
$schema_path = "/usr/share/doc/zabbix-*-pgsql-${zabbix_version}*/"
}
} else {
if versioncmp($zabbix_version, '6.0') >= 0 {
$schema_path = '/usr/share/zabbix-sql-scripts/postgresql/'
} elsif versioncmp($zabbix_version, '5.4') >= 0 {
$schema_path = '/usr/share/doc/zabbix-sql-scripts/postgresql/'
} else {
$schema_path = '/usr/share/doc/zabbix-*-pgsql'
}
Expand Down
2 changes: 0 additions & 2 deletions spec/classes/database_mysql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
# path to sql files on Debian and RedHat
path = if Puppet::Util::Package.versioncmp(zabbix_version, '6.0') >= 0
'/usr/share/zabbix-sql-scripts/mysql/'
elsif Puppet::Util::Package.versioncmp(zabbix_version, '5.4') >= 0
'/usr/share/doc/zabbix-sql-scripts/mysql/'
else
'/usr/share/doc/zabbix-*-mysql*'
Copy link
Member

Choose a reason for hiding this comment

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

I assume those defaults are valid for the LTS zabbix?

Copy link
Member Author

Choose a reason for hiding this comment

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

so do I 😁

(there is a >= 6.0 specialcase above, which should catch new things, and 5.0 and 4.0 already ended up in the else case before this change)

end
Expand Down
4 changes: 0 additions & 4 deletions spec/classes/database_postgresql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,13 @@
# Path on RedHat
if Puppet::Util::Package.versioncmp(zabbix_version, '6.0') >= 0
'/usr/share/zabbix-sql-scripts/postgresql/'
elsif Puppet::Util::Package.versioncmp(zabbix_version, '5.4') >= 0
'/usr/share/doc/zabbix-sql-scripts/postgresql/'
else
"/usr/share/doc/zabbix-*-pgsql-#{zabbix_version}*/"
end
else
# Path on Debian
if Puppet::Util::Package.versioncmp(zabbix_version, '6.0') >= 0
'/usr/share/zabbix-sql-scripts/postgresql/'
elsif Puppet::Util::Package.versioncmp(zabbix_version, '5.4') >= 0
'/usr/share/doc/zabbix-sql-scripts/postgresql/'
else
'/usr/share/doc/zabbix-*-pgsql'
end
Expand Down