From e1c55b9475f15809eeb6fe02d87e592d891e11ad Mon Sep 17 00:00:00 2001 From: Alexander Weidinger Date: Sun, 8 Jan 2017 21:54:14 +0100 Subject: [PATCH] FreeBSD: apache.mod_proxy_http --- apache/files/FreeBSD/mod_proxy_http.conf.jinja | 3 +++ apache/mod_proxy_http.sls | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 apache/files/FreeBSD/mod_proxy_http.conf.jinja diff --git a/apache/files/FreeBSD/mod_proxy_http.conf.jinja b/apache/files/FreeBSD/mod_proxy_http.conf.jinja new file mode 100644 index 0000000..81b8294 --- /dev/null +++ b/apache/files/FreeBSD/mod_proxy_http.conf.jinja @@ -0,0 +1,3 @@ +{% from "apache/map.jinja" import apache with context %} + +LoadModule proxy_http_module libexec/{{ apache.service }}/mod_proxy_http.so diff --git a/apache/mod_proxy_http.sls b/apache/mod_proxy_http.sls index fcdbae3..703e07e 100644 --- a/apache/mod_proxy_http.sls +++ b/apache/mod_proxy_http.sls @@ -1,3 +1,5 @@ +{% from "apache/map.jinja" import apache with context %} + {% if grains['os_family']=="Debian" %} include: @@ -14,4 +16,15 @@ a2enmod proxy_http: - watch_in: - module: apache-restart +{% elif grains['os_family']=="FreeBSD" %} +{{ apache.modulesdir }}/040_mod_proxy_http.conf: + file.managed: + - source: salt://apache/files/{{ salt['grains.get']('os_family') }}/mod_proxy_http.conf.jinja + - mode: 644 + - template: jinja + - require: + - pkg: apache + - watch_in: + - module: apache-restart + {% endif %}