2015-06-19 20:44:53 +02:00
|
|
|
{% from "apache/map.jinja" import apache with context %}
|
|
|
|
|
|
|
|
include:
|
|
|
|
- apache
|
|
|
|
|
|
|
|
{{ apache.configfile }}:
|
|
|
|
file.managed:
|
|
|
|
- template: jinja
|
|
|
|
- source:
|
2015-12-09 06:45:36 +01:00
|
|
|
- salt://apache/files/{{ salt['grains.get']('os_family') }}/apache-{{ apache.version }}.config.jinja
|
2015-06-19 20:44:53 +02:00
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- service: apache
|
2015-12-09 06:45:36 +01:00
|
|
|
- context:
|
|
|
|
apache: {{ apache }}
|
2015-06-19 20:44:53 +02:00
|
|
|
|
2015-07-22 14:36:25 +02:00
|
|
|
{{ apache.vhostdir }}:
|
|
|
|
file.directory:
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- service: apache
|
|
|
|
|
2015-06-19 20:44:53 +02:00
|
|
|
{% if grains['os_family']=="Debian" %}
|
|
|
|
/etc/apache2/envvars:
|
2015-07-08 15:33:19 +02:00
|
|
|
file.managed:
|
2015-06-19 20:44:53 +02:00
|
|
|
- template: jinja
|
|
|
|
- source:
|
2015-07-08 15:33:19 +02:00
|
|
|
- salt://apache/files/Debian/envvars.jinja
|
2015-06-19 20:44:53 +02:00
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- service: apache
|
|
|
|
{% endif %}
|
2015-07-22 10:13:38 +02:00
|
|
|
|
|
|
|
{% if grains['os_family']=="RedHat" %}
|
|
|
|
/etc/httpd/conf.d/welcome.conf:
|
|
|
|
file.absent:
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- service: apache
|
|
|
|
{% endif %}
|
2016-01-19 10:02:31 +01:00
|
|
|
|
|
|
|
{% if grains['os_family']=="Suse" %}
|
|
|
|
/etc/apache2/sysconfig.d/global.conf:
|
|
|
|
file.managed:
|
|
|
|
- template: jinja
|
|
|
|
- source:
|
|
|
|
- salt://apache/files/{{ salt['grains.get']('os_family') }}/global.config.jinja
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- service: apache
|
|
|
|
- context:
|
|
|
|
apache: {{ apache }}
|
|
|
|
{% endif %}
|