Do not pass full apache context to vhost templates.tags/v1.1.1
'Dav': loc.get('Dav', False), | 'Dav': loc.get('Dav', False), | ||||
} %} | } %} | ||||
<Location "{{ path }}"> | <Location "{{ path }}"> | ||||
{%- if apache.version == '2.4' %} | |||||
{%- if map.version == '2.4' %} | |||||
{% if lvals.get('Require') != False %}Require {{ lvals.Require }}{% endif %} | {% if lvals.get('Require') != False %}Require {{ lvals.Require }}{% endif %} | ||||
{%- else %} | {%- else %} | ||||
{% if lvals.get('Order') != False %}Order {{ lvals.Order }}{% endif %} | {% if lvals.get('Order') != False %}Order {{ lvals.Order }}{% endif %} | ||||
'Dav': locmat.get('Dav', False), | 'Dav': locmat.get('Dav', False), | ||||
} %} | } %} | ||||
<LocationMatch "{{ regpath }}"> | <LocationMatch "{{ regpath }}"> | ||||
{%- if apache.version == '2.4' %} | |||||
{%- if map.version == '2.4' %} | |||||
{% if lmvals.get('Require') != False %}Require {{ lmvals.Require }}{% endif %} | {% if lmvals.get('Require') != False %}Require {{ lmvals.Require }}{% endif %} | ||||
{%- else %} | {%- else %} | ||||
{% if lmvals.get('Order') != False %}Order {{ lmvals.Order }}{% endif %} | {% if lmvals.get('Order') != False %}Order {{ lmvals.Order }}{% endif %} |
{%- set sls_package_install = tplroot ~ '.package.install' %} | {%- set sls_package_install = tplroot ~ '.package.install' %} | ||||
{%- set sls_service_running = tplroot ~ '.service.running' %} | {%- set sls_service_running = tplroot ~ '.service.running' %} | ||||
{%- from tplroot ~ "/map.jinja" import apache with context %} | {%- from tplroot ~ "/map.jinja" import apache with context %} | ||||
{#- The apache variable can grow _very_ large, especially the sites subkey. | |||||
Create a trimmed copy with config variables. #} | |||||
{%- set map = apache %} | |||||
{%- do map.pop('sites', None) %} | |||||
include: | include: | ||||
- {{ sls_package_install }} | - {{ sls_package_install }} | ||||
- template: {{ apache.get('template_engine', 'jinja') }} | - template: {{ apache.get('template_engine', 'jinja') }} | ||||
- makedirs: True | - makedirs: True | ||||
- context: | - context: | ||||
apache: {{ apache|json }} | |||||
id: {{ id|json }} | |||||
site: {{ site|json }} | |||||
map: {{ apache|json }} | |||||
id: {{ id|json }} | |||||
site: {{ site|json }} | |||||
map: {{ map|json }} | |||||
- require: | - require: | ||||
- pkg: apache-package-install-pkg-installed | - pkg: apache-package-install-pkg-installed | ||||
- watch_in: | - watch_in: |