Commit 909fe8a1 authored by Rafael Monnerat's avatar Rafael Monnerat

apache-frontend: Few cosmetics to reduce final file size.

parent 4a0377ce
...@@ -52,9 +52,9 @@ srv = $${buildout:directory}/srv/ ...@@ -52,9 +52,9 @@ srv = $${buildout:directory}/srv/
var = $${buildout:directory}/var/ var = $${buildout:directory}/var/
template = $${buildout:directory}/template/ template = $${buildout:directory}/template/
backup = $${buildout:directory}/srv/backup backup = $${:srv}/backup
log = $${buildout:directory}/var/log log = $${:var}/log
run = $${buildout:directory}/var/run run = $${:var}/run
service = $${:etc}/service service = $${:etc}/service
etc-run = $${:etc}/run etc-run = $${:etc}/run
promise = $${:etc}/promise promise = $${:etc}/promise
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
{% endif -%} {% endif -%}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
extra-context = extra-context =
context = context =
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
...@@ -184,6 +185,10 @@ cert-content = {{ dumps(slave_instance.get('ssl_crt')) }} ...@@ -184,6 +185,10 @@ cert-content = {{ dumps(slave_instance.get('ssl_crt')) }}
{% set apache_custom_https = ((slave_instance.pop('apache_custom_https', '')) % slave_parameter_dict) -%} {% set apache_custom_https = ((slave_instance.pop('apache_custom_https', '')) % slave_parameter_dict) -%}
apache_custom_http = {{ dumps(apache_custom_http) }} apache_custom_http = {{ dumps(apache_custom_http) }}
apache_custom_https = {{ dumps(apache_custom_https) }} apache_custom_https = {{ dumps(apache_custom_https) }}
{{ '\n' }}
{% for key, value in slave_instance.iteritems() -%}
{{ key }} = {{ dumps(value) }}
{% endfor %}
[{{ slave_section_title }}] [{{ slave_section_title }}]
< = jinja2-template-base < = jinja2-template-base
...@@ -192,22 +197,16 @@ template = {{ template_custom_slave_configuration }} ...@@ -192,22 +197,16 @@ template = {{ template_custom_slave_configuration }}
{% else %} {% else %}
template = {{ template_default_slave_configuration }} template = {{ template_default_slave_configuration }}
{% endif %} {% endif %}
filename = {{ '%s.conf' % slave_reference }} filename = {{ '%s.conf' % slave_reference }}
rendered = {{ apache_configuration_directory }}/${:filename}
extensions = jinja2.ext.do
extra-context = extra-context =
raw https_port {{ https_port }} raw https_port {{ https_port }}
raw http_port {{ http_port }} raw http_port {{ http_port }}
section slave_parameter {{ slave_configuration_section_name }} section slave_parameter {{ slave_configuration_section_name }}
{{ '\n' }} {{ '\n' }}
[{{ slave_configuration_section_name }}] {# ############################### #}
{% for key, value in slave_instance.iteritems() -%} {# Publish Slave Information #}
{{ key }} = {{ dumps(value) }}
{% endfor %}
############################
#### Publish Slave Information
{% if not extra_slave_instance_list -%} {% if not extra_slave_instance_list -%}
{% set publish_section_title = 'publish-%s-connection-information' % slave_instance.get('slave_reference') -%} {% set publish_section_title = 'publish-%s-connection-information' % slave_instance.get('slave_reference') -%}
{% do part_list.append(publish_section_title) -%} {% do part_list.append(publish_section_title) -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment