From eafa4196d9495bc975c7e1e7036969bdaba1441d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20B=C3=A9rtoli?= Date: Mon, 11 May 2020 16:04:40 -0300 Subject: [PATCH] fix(server-status): manage module in debian --- apache/server_status.sls | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/apache/server_status.sls b/apache/server_status.sls index dc8169f..989100f 100644 --- a/apache/server_status.sls +++ b/apache/server_status.sls @@ -18,3 +18,25 @@ include: - module: apache-restart - module: apache-reload - service: apache + +{% if grains['os_family']=="Debian" %} +a2endisconf server-status: + cmd.run: +{% if apache.get('server_status_require') is defined %} + - name: a2enconf server-status + - unless: test -L /etc/apache2/conf-enabled/server-status.conf +{% else %} + - name: a2disconf server-status + - onlyif: test -L /etc/apache2/conf-enabled/server-status.conf +{% endif %} + - order: 225 + - require: + - pkg: apache + - file: {{ apache.confdir }}/server-status.conf + - watch_in: + - module: apache-restart + - require_in: + - module: apache-restart + - module: apache-reload + - service: apache +{% endif %}