apache-formula/apache/mod_rewrite.sls

29 lines
635 B
Plaintext
Raw Normal View History

2017-01-08 12:48:42 +01:00
{% from "apache/map.jinja" import apache with context %}
2013-07-29 23:29:41 +02:00
include:
- apache
2013-07-29 23:29:41 +02:00
2017-01-08 12:48:42 +01:00
{% if grains['os_family']=="Debian" %}
2013-07-29 23:29:41 +02:00
a2enmod rewrite:
cmd.run:
- unless: ls /etc/apache2/mods-enabled/rewrite.load
2013-07-29 23:32:16 +02:00
- order: 225
- require:
- pkg: apache
2013-07-29 23:29:41 +02:00
- watch_in:
- module: apache-restart
2013-07-29 23:29:41 +02:00
2017-01-08 12:48:42 +01:00
{% elif grains['os_family']=="FreeBSD" %}
{{ apache.modulesdir }}/040_mod_rewrite.conf:
file.managed:
- source: salt://apache/files/{{ salt['grains.get']('os_family') }}/mod_rewrite.conf.jinja
- mode: 644
- template: jinja
- require:
- pkg: apache
- watch_in:
- module: apache-restart
2013-07-29 23:29:41 +02:00
{% endif %}