2019-10-11 20:49:09 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-09-04 00:07:35 +01:00
|
|
|
# Override by OS.
|
2019-07-06 10:46:03 +01:00
|
|
|
package_name = 'mariadb-server'
|
2019-10-11 20:49:09 +01:00
|
|
|
if (os[:name] == 'suse') || (os[:name] == 'opensuse')
|
2019-07-06 10:46:03 +01:00
|
|
|
package_name = 'mariadb'
|
2021-09-04 00:07:35 +01:00
|
|
|
elsif os[:release].start_with?('8') && %w[debian centos].include?(os[:name])
|
2021-06-10 00:24:06 +01:00
|
|
|
package_name = 'mysql-server'
|
2019-07-06 10:46:03 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
control 'mysql package' do
|
|
|
|
title 'should be installed'
|
|
|
|
|
|
|
|
describe package(package_name) do
|
|
|
|
it { should be_installed }
|
|
|
|
end
|
|
|
|
end
|