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
841B

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