2018-11-27 19:53:15 +01:00
|
|
|
{% from "apache/map.jinja" import apache with context %}
|
|
|
|
|
|
|
|
include:
|
|
|
|
- apache
|
|
|
|
- apache.config
|
|
|
|
|
2019-10-17 08:52:42 +02:00
|
|
|
{{ apache.confdir }}/server-status{{ apache.confext }}:
|
2018-11-27 19:53:15 +01:00
|
|
|
file.managed:
|
|
|
|
- source: salt://apache/files/server-status.conf.jinja
|
|
|
|
- template: jinja
|
2019-09-25 20:03:49 +02:00
|
|
|
- context:
|
|
|
|
apache: {{ apache | json }}
|
2018-11-27 19:53:15 +01:00
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- require_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- module: apache-reload
|
|
|
|
- service: apache
|
2020-05-11 21:04:40 +02:00
|
|
|
|
2020-07-18 18:26:39 +02:00
|
|
|
{%- if grains['os_family'] == "Debian" %}
|
|
|
|
a2enconf server-status:
|
2020-05-11 21:04:40 +02:00
|
|
|
cmd.run:
|
2020-07-18 18:26:39 +02:00
|
|
|
- unless: 'test -L /etc/apache2/conf-enabled/server-status.conf'
|
2020-05-11 21:04:40 +02:00
|
|
|
- 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 %}
|