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.

45 lines
921B

  1. {% from "apache/map.jinja" import apache with context %}
  2. include:
  3. - apache
  4. {{ apache.configfile }}:
  5. file.managed:
  6. - template: jinja
  7. - source:
  8. - salt://apache/files/{{ salt['grains.get']('os_family') }}/apache-{{ apache.version }}.config.jinja
  9. - require:
  10. - pkg: apache
  11. - watch_in:
  12. - service: apache
  13. - context:
  14. apache: {{ apache }}
  15. {{ apache.vhostdir }}:
  16. file.directory:
  17. - require:
  18. - pkg: apache
  19. - watch_in:
  20. - service: apache
  21. {% if grains['os_family']=="Debian" %}
  22. /etc/apache2/envvars:
  23. file.managed:
  24. - template: jinja
  25. - source:
  26. - salt://apache/files/Debian/envvars.jinja
  27. - require:
  28. - pkg: apache
  29. - watch_in:
  30. - service: apache
  31. {% endif %}
  32. {% if grains['os_family']=="RedHat" %}
  33. /etc/httpd/conf.d/welcome.conf:
  34. file.absent:
  35. - require:
  36. - pkg: apache
  37. - watch_in:
  38. - service: apache
  39. {% endif %}