2020-05-01 09:32:39 +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-05-01 09:32:39 +02:00
|
|
|
control 'salt services' do
|
|
|
|
title 'should be running'
|
|
|
|
|
2021-03-30 12:55:03 +02:00
|
|
|
services.each do |p|
|
2020-05-01 09:32:39 +02:00
|
|
|
describe service(p) do
|
|
|
|
it { should be_installed }
|
|
|
|
it { should be_enabled }
|
|
|
|
it { should be_running }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|