Saltstack Official OpenSSH Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

openssl_server_spec.rb 594B

1234567891011121314151617181920212223242526272829
  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