35 lines
728 B
Ruby
35 lines
728 B
Ruby
|
require 'serverspec'
|
||
|
|
||
|
set :backend, :exec
|
||
|
|
||
|
puts
|
||
|
puts '================================'
|
||
|
puts %x(ansible --version)
|
||
|
puts '================================'
|
||
|
|
||
|
sleep 10
|
||
|
|
||
|
describe package('filebeat') do
|
||
|
it { should be_installed }
|
||
|
end
|
||
|
|
||
|
describe file('/etc/filebeat/filebeat.yml') do
|
||
|
it { should be_file }
|
||
|
it { should be_mode 644 }
|
||
|
it { should be_owned_by 'root' }
|
||
|
it { should be_grouped_into 'root' }
|
||
|
end
|
||
|
|
||
|
describe service('filebeat') do
|
||
|
it { should be_enabled }
|
||
|
it { should be_running.under('systemd') }
|
||
|
end
|
||
|
|
||
|
describe file('/tmp/filebeat/filebeat') do
|
||
|
it { should be_file }
|
||
|
it { should be_mode 600 }
|
||
|
it { should be_owned_by 'root' }
|
||
|
it { should be_grouped_into 'root' }
|
||
|
it { should contain '@timestamp' }
|
||
|
end
|