From 0c1423f8f1abc33b247f9f053bd5422384047577 Mon Sep 17 00:00:00 2001
From: Andreas Thienemann <andreas@bawue.net>
Date: Sat, 20 Apr 2019 09:32:44 +0200
Subject: [PATCH] Fix mod_remoteip for Red Hat family OS (#260)

The source template was missing for RH based systems, only the Debian
file was packaged.

Fix this.
---
 apache/files/RedHat/conf.modules.d/remoteip.conf.jinja | 6 ++++++
 apache/mod_remoteip.sls                                | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 apache/files/RedHat/conf.modules.d/remoteip.conf.jinja

diff --git a/apache/files/RedHat/conf.modules.d/remoteip.conf.jinja b/apache/files/RedHat/conf.modules.d/remoteip.conf.jinja
new file mode 100644
index 0000000..17260b3
--- /dev/null
+++ b/apache/files/RedHat/conf.modules.d/remoteip.conf.jinja
@@ -0,0 +1,6 @@
+# managed by saltstack
+
+RemoteIPHeader {{ salt['pillar.get']('apache:mod_remoteip:RemoteIPHeader', 'X-Forwarded-For') }}
+{%- for trusted_proxy in salt['pillar.get']('apache:mod_remoteip:RemoteIPTrustedProxy', []) %}
+RemoteIPTrustedProxy {{ trusted_proxy }}
+{%- endfor %}
diff --git a/apache/mod_remoteip.sls b/apache/mod_remoteip.sls
index b2d399d..eaa0057 100644
--- a/apache/mod_remoteip.sls
+++ b/apache/mod_remoteip.sls
@@ -54,7 +54,7 @@ include:
   file.managed:
     - template: jinja
     - source:
-      - salt://apache/files/{{ salt['grains.get']('os_family') }}/remoteip.conf.jinja
+      - salt://apache/files/{{ salt['grains.get']('os_family') }}/conf.modules.d/remoteip.conf.jinja
     - require:
       - pkg: apache
     - watch_in:
-- 
GitLab