|
|
|
|
|
|
|
|
{% if grains['os_family']=="Debian" %} |
|
|
|
|
|
|
|
|
|
|
|
{% from "apache/map.jinja" import apache with context %} |
|
|
{% from "apache/map.jinja" import apache with context %} |
|
|
|
|
|
|
|
|
include: |
|
|
include: |
|
|
- apache |
|
|
- apache |
|
|
|
|
|
|
|
|
|
|
|
{% if grains['os_family']=="Debian" %} |
|
|
|
|
|
|
|
|
{% if salt['file.file_exists' ]('/etc/apache2/conf-available/security.conf') %} |
|
|
{% if salt['file.file_exists' ]('/etc/apache2/conf-available/security.conf') %} |
|
|
apache_security-block: |
|
|
apache_security-block: |
|
|
file.blockreplace: |
|
|
file.blockreplace: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{% elif grains['os_family']=="FreeBSD" %} |
|
|
|
|
|
{{ apache.confdir }}/security.conf: |
|
|
|
|
|
file.managed: |
|
|
|
|
|
- source: salt://apache/files/{{ salt['grains.get']('os_family') }}/security.conf.jinja |
|
|
|
|
|
- mode: 644 |
|
|
|
|
|
- template: jinja |
|
|
|
|
|
- require: |
|
|
|
|
|
- pkg: apache |
|
|
|
|
|
- watch_in: |
|
|
|
|
|
- module: apache-restart |
|
|
{% endif %} |
|
|
{% endif %} |