blob: db5b6f91ab5313871453de8b4790c8f5d6a0ac69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
{%- set snippetsdir = '/etc/apache2/snippets.d' -%}
{%- set mypillar = salt['pillar.get']('profile:apache-httpd', {}) -%}
{{ snippetsdir }}:
file.directory:
- makedirs: True
{%- if 'snippets' in mypillar %}
{%- for snippet, config in mypillar['snippets'].items() %}
{{ snippetsdir }}/{{ snippet }}.conf:
file.managed:
- contents:
{%- for line in config %}
- {{ line }}
{%- endfor %}
- require:
- file: {{ snippetsdir }}
{#- formula dependencies #}
- require_in:
- module: apache-service-running-restart
- service: apache-service-running
- watch_in:
- module: apache-service-running-reload
{%- endfor %}
{%- endif %}
include:
- apache.config
|