2017-01-08 12:03:48 +01:00
|
|
|
{% from "apache/map.jinja" import apache with context %}
|
2014-01-04 19:29:22 +01:00
|
|
|
|
|
|
|
include:
|
|
|
|
- apache
|
|
|
|
|
2017-01-08 12:03:48 +01:00
|
|
|
{% if grains['os_family']=="Debian" %}
|
2015-11-23 19:31:45 +01:00
|
|
|
a2enmod mod_proxy:
|
2014-01-04 19:29:22 +01:00
|
|
|
cmd.run:
|
2015-11-23 19:39:28 +01:00
|
|
|
- name: a2enmod proxy
|
2014-01-04 19:29:22 +01:00
|
|
|
- unless: ls /etc/apache2/mods-enabled/proxy.load
|
|
|
|
- order: 225
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
2014-01-04 23:54:45 +01:00
|
|
|
- module: apache-restart
|
2018-11-09 00:25:52 +01:00
|
|
|
- require_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- module: apache-reload
|
|
|
|
- service: apache
|
2014-01-04 19:29:22 +01:00
|
|
|
|
2017-01-08 12:03:48 +01:00
|
|
|
{% elif grains['os_family']=="FreeBSD" %}
|
|
|
|
{{ apache.modulesdir }}/040_mod_proxy.conf:
|
|
|
|
file.managed:
|
|
|
|
- source: salt://apache/files/{{ salt['grains.get']('os_family') }}/mod_proxy.conf.jinja
|
|
|
|
- mode: 644
|
|
|
|
- template: jinja
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- module: apache-restart
|
2018-11-09 00:25:52 +01:00
|
|
|
- require_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- module: apache-reload
|
|
|
|
- service: apache
|
2017-01-08 12:03:48 +01:00
|
|
|
|
2014-01-04 19:29:22 +01:00
|
|
|
{% endif %}
|