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.

43 lines
1.1KB

  1. {% from "apache/map.jinja" import apache with context %}
  2. include:
  3. - apache
  4. - apache.config
  5. {{ apache.confdir }}/server-status{{ apache.confext }}:
  6. file.managed:
  7. - source: salt://apache/files/server-status.conf.jinja
  8. - template: jinja
  9. - context:
  10. apache: {{ apache | json }}
  11. - require:
  12. - pkg: apache
  13. - watch_in:
  14. - module: apache-restart
  15. - require_in:
  16. - module: apache-restart
  17. - module: apache-reload
  18. - service: apache
  19. {% if grains['os_family']=="Debian" %}
  20. a2endisconf server-status:
  21. cmd.run:
  22. {% if apache.get('server_status_require') is defined %}
  23. - name: a2enconf server-status
  24. - unless: test -L /etc/apache2/conf-enabled/server-status.conf
  25. {% else %}
  26. - name: a2disconf server-status
  27. - onlyif: test -L /etc/apache2/conf-enabled/server-status.conf
  28. {% endif %}
  29. - order: 225
  30. - require:
  31. - pkg: apache
  32. - file: {{ apache.confdir }}/server-status.conf
  33. - watch_in:
  34. - module: apache-restart
  35. - require_in:
  36. - module: apache-restart
  37. - module: apache-reload
  38. - service: apache
  39. {% endif %}