2020-06-23 09:44:08 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-03-30 12:55:03 +02:00
|
|
|
services =
|
|
|
|
case system.platform[:family]
|
|
|
|
when 'bsd'
|
|
|
|
%w[salt_master salt_minion]
|
|
|
|
when 'windows'
|
|
|
|
%w[salt-minion]
|
|
|
|
else
|
|
|
|
%w[salt-master salt-minion]
|
|
|
|
end
|
|
|
|
|
2020-06-23 09:44:08 +02:00
|
|
|
control 'salt services' do
|
|
|
|
title 'should be running'
|
|
|
|
|
2021-03-30 12:55:03 +02:00
|
|
|
services.each do |p|
|
2020-06-23 09:44:08 +02:00
|
|
|
describe service(p) do
|
|
|
|
it { should be_installed }
|
|
|
|
it { should be_enabled }
|
|
|
|
it { should be_running }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|