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.

48 lines
808B

  1. include:
  2. - apt
  3. - apache.register_site
  4. {% if grains['os']=="Ubuntu" %}
  5. apache:
  6. pkg.installed:
  7. - name: apache2
  8. - order: 175
  9. service.running:
  10. - name: apache2
  11. - enable: True
  12. - order: 455
  13. a2dissite 000-default:
  14. cmd.run:
  15. - order: 225
  16. - onlyif: ls /etc/apache2/sites-enabled/000-default
  17. - watch_in:
  18. - cmd: apache-reload
  19. - require:
  20. - pkg: apache
  21. apache-reload:
  22. cmd.wait:
  23. - name: service apache2 reload
  24. - order: 420
  25. apache-restart:
  26. cmd.wait:
  27. - name: service apache2 restart
  28. - order: 425
  29. /etc/apache2/sites-available/default:
  30. file.absent:
  31. - order: 230
  32. - require:
  33. - pkg: apache
  34. /etc/apache2/sites-available/default-ssl:
  35. file.absent:
  36. - order: 230
  37. - require:
  38. - pkg: apache
  39. {% endif %} #END: os = ubuntu