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.

39 lines
901B

  1. {% from "apache/map.jinja" import apache with context %}
  2. include:
  3. - apache
  4. - apache.mod_proxy
  5. {% if grains['os_family']=="Debian" %}
  6. a2enmod proxy_http:
  7. cmd.run:
  8. - unless: ls /etc/apache2/mods-enabled/proxy_http.load
  9. - order: 225
  10. - require:
  11. - pkg: apache
  12. - cmd: a2enmod proxy
  13. - watch_in:
  14. - module: apache-restart
  15. - require_in:
  16. - module: apache-restart
  17. - module: apache-reload
  18. - service: apache
  19. {% elif grains['os_family']=="FreeBSD" %}
  20. {{ apache.modulesdir }}/040_mod_proxy_http.conf:
  21. file.managed:
  22. - source: salt://apache/files/{{ salt['grains.get']('os_family') }}/mod_proxy_http.conf.jinja
  23. - mode: 644
  24. - template: jinja
  25. - require:
  26. - pkg: apache
  27. - watch_in:
  28. - module: apache-restart
  29. - require_in:
  30. - module: apache-restart
  31. - module: apache-reload
  32. - service: apache
  33. {% endif %}