Saltstack Official OpenSSH Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openssl_server_spec.rb 694B

123456789101112131415161718192021222324252627282930313233343536
  1. require 'serverspec'
  2. set :backend, :exec
  3. def service_name()
  4. return case os[:family]
  5. when 'debian', 'ubuntu' then 'ssh'
  6. else 'sshd'
  7. end
  8. end
  9. def root_group()
  10. return case os[:family]
  11. when 'freebsd' then 'wheel'
  12. else 'root'
  13. end
  14. end
  15. describe 'openssl/config.sls' do
  16. describe service(service_name()) do
  17. it { should be_running }
  18. end
  19. describe file('/etc/ssh/sshd_config') do
  20. it { should be_mode 600 }
  21. it { should be_owned_by 'root' }
  22. it { should be_grouped_into root_group() }
  23. end
  24. describe file('/etc/ssh/ssh_config') do
  25. it { should be_mode 644 }
  26. it { should be_owned_by 'root' }
  27. it { should be_grouped_into root_group() }
  28. end
  29. end