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.

30 lines
594B

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