2015-06-19 20:44:53 +02:00
|
|
|
{% from "apache/map.jinja" import apache with context %}
|
|
|
|
|
|
|
|
include:
|
|
|
|
- apache
|
|
|
|
|
2018-08-15 02:01:40 +02:00
|
|
|
{{ apache.logdir }}:
|
|
|
|
file.directory:
|
|
|
|
- makedirs: True
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- service: apache
|
|
|
|
|
2015-06-19 20:44:53 +02:00
|
|
|
{{ 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
|
|
|
|
2017-04-24 20:33:44 +02:00
|
|
|
{{ apache.vhostdir }}:
|
|
|
|
file.directory:
|
|
|
|
- makedirs: True
|
|
|
|
- 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:
|
2016-03-24 15:22:23 +01:00
|
|
|
- salt://apache/files/{{ salt['grains.get']('os_family') }}/envvars-{{ apache.version }}.jinja
|
2015-06-19 20:44:53 +02:00
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- service: apache
|
2016-02-01 17:03:47 +01:00
|
|
|
|
|
|
|
{{ apache.portsfile }}:
|
|
|
|
file.managed:
|
|
|
|
- template: jinja
|
|
|
|
- source:
|
|
|
|
- salt://apache/files/{{ salt['grains.get']('os_family') }}/ports-{{ apache.version }}.conf.jinja
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- service: apache
|
|
|
|
- context:
|
|
|
|
apache: {{ apache }}
|
|
|
|
|
2015-06-19 20:44:53 +02:00
|
|
|
{% 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
|
|
|
|
2017-08-24 12:41:05 +02:00
|
|
|
{% if grains['os_family']=="Suse" or salt['grains.get']('os') == 'SUSE' %}
|
2017-03-17 13:13:31 +01:00
|
|
|
/etc/apache2/global.conf:
|
2016-01-19 10:02:31 +01:00
|
|
|
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 %}
|
2016-09-26 23:51:47 +02:00
|
|
|
|
|
|
|
{% if grains['os_family']=="FreeBSD" %}
|
2017-01-05 12:32:44 +01:00
|
|
|
/usr/local/etc/{{ apache.service }}/envvars.d/by_salt.env:
|
|
|
|
file.managed:
|
|
|
|
- template: jinja
|
|
|
|
- source:
|
|
|
|
- salt://apache/files/{{ salt['grains.get']('os_family') }}/envvars-{{ apache.version }}.jinja
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- service: apache
|
|
|
|
|
2016-09-26 23:51:47 +02:00
|
|
|
{{ apache.portsfile }}:
|
|
|
|
file.managed:
|
|
|
|
- template: jinja
|
|
|
|
- source:
|
|
|
|
- salt://apache/files/{{ salt['grains.get']('os_family') }}/ports-{{ apache.version }}.conf.jinja
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- service: apache
|
|
|
|
- context:
|
|
|
|
apache: {{ apache }}
|
|
|
|
{% endif %}
|