Saltstack Official Apache 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.

27 lines
490B

  1. # frozen_string_literal: true
  2. # Overide by OS
  3. control 'apache service' do
  4. impact 0.5
  5. title 'should be running and enabled'
  6. service_name =
  7. case platform[:family]
  8. when 'debian', 'suse'
  9. 'apache2'
  10. when 'redhat', 'fedora', 'linux'
  11. 'httpd'
  12. when 'gentoo'
  13. 'www-servers/apache'
  14. when 'bsd'
  15. 'apache24'
  16. when 'windows'
  17. 'apache'
  18. end
  19. describe service(service_name) do
  20. it { should be_enabled }
  21. it { should be_running }
  22. end
  23. end