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.

37 lines
862B

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