mirror of
https://github.com/inspec/inspec
synced 2024-11-27 23:20:33 +00:00
6c19e81a06
Signed-off-by: Miah Johnson <miah@chia-pet.org>
25 lines
504 B
Ruby
25 lines
504 B
Ruby
|
|
# use basic tests
|
|
describe package('nginx') do
|
|
it { should be_installed }
|
|
end
|
|
|
|
# extend tests with metadata
|
|
control '01' do
|
|
impact 0.7
|
|
title 'Verify nginx service'
|
|
desc 'Ensures nginx service is up and running'
|
|
describe service('nginx') do
|
|
it { should be_enabled }
|
|
it { should be_installed }
|
|
it { should be_running }
|
|
end
|
|
end
|
|
|
|
# implement os dependent tests
|
|
web_user = 'www-data'
|
|
web_user = 'nginx' if os[:family] == 'centos'
|
|
|
|
describe user(web_user) do
|
|
it { should exist }
|
|
end
|