Commit 4146eef0 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Simplify instance.cfg.in

parent 61ebfefe
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 58f330d2655f5438c445a6181d32f259 md5sum = 9c8ef6434cd36617c51b4245f6968593
[profile-common] [profile-common]
filename = instance-common.cfg.in filename = instance-common.cfg.in
......
...@@ -10,6 +10,7 @@ recipe = caddyprofiledeps ...@@ -10,6 +10,7 @@ recipe = caddyprofiledeps
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename} rendered = ${buildout:directory}/${:filename}
extensions = jinja2.ext.do
extra-context = extra-context =
context = context =
import json_module json import json_module json
...@@ -18,6 +19,9 @@ context = ...@@ -18,6 +19,9 @@ context =
section instance_parameter_dict instance-parameter section instance_parameter_dict instance-parameter
section software_parameter_dict software-parameter-section section software_parameter_dict software-parameter-section
${:extra-context} ${:extra-context}
caucase-jinja2-library = {{ software_parameter_dict['caucase_jinja2_library'] }}
import-list =
file caucase :caucase-jinja2-library
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
...@@ -38,20 +42,15 @@ kedifa = ${dynamic-profile-kedifa:rendered} ...@@ -38,20 +42,15 @@ kedifa = ${dynamic-profile-kedifa:rendered}
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['profile_caddy_frontend'] }} template = {{ software_parameter_dict['profile_caddy_frontend'] }}
filename = instance-caddy-frontend.cfg filename = instance-caddy-frontend.cfg
extensions = jinja2.ext.do
extra-context = extra-context =
import furl_module furl import furl_module furl
raw software_type single-custom-personal raw software_type single-custom-personal
caucase-jinja2-library = {{ software_parameter_dict['caucase_jinja2_library'] }}
import-list =
file caucase :caucase-jinja2-library
[dynamic-profile-caddy-replicate] [dynamic-profile-caddy-replicate]
< = jinja2-template-base < = jinja2-template-base
depends = ${caddyprofiledeps:recipe} depends = ${caddyprofiledeps:recipe}
template = {{ software_parameter_dict['profile_caddy_replicate'] }} template = {{ software_parameter_dict['profile_caddy_replicate'] }}
filename = instance-caddy-replicate.cfg filename = instance-caddy-replicate.cfg
extensions = jinja2.ext.do
extra-context = extra-context =
import subprocess_module subprocess import subprocess_module subprocess
import functools_module functools import functools_module functools
...@@ -59,20 +58,13 @@ extra-context = ...@@ -59,20 +58,13 @@ extra-context =
key cluster_identification instance-parameter:root-instance-title key cluster_identification instance-parameter:root-instance-title
# Must match the key id in [switch-softwaretype] which uses this section. # Must match the key id in [switch-softwaretype] which uses this section.
raw software_type RootSoftwareInstance-default-custom-personal-replicate raw software_type RootSoftwareInstance-default-custom-personal-replicate
caucase-jinja2-library = {{ software_parameter_dict['caucase_jinja2_library'] }}
import-list =
file caucase :caucase-jinja2-library
[dynamic-profile-kedifa] [dynamic-profile-kedifa]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['profile_kedifa'] }} template = {{ software_parameter_dict['profile_kedifa'] }}
filename = instance-kedifa.cfg filename = instance-kedifa.cfg
extensions = jinja2.ext.do
extra-context = extra-context =
raw software_type kedifa raw software_type kedifa
caucase-jinja2-library = {{ software_parameter_dict['caucase_jinja2_library'] }}
import-list =
file caucase :caucase-jinja2-library
[instance-parameter] [instance-parameter]
# Fetches parameters defined in SlapOS Master for this instance. # Fetches parameters defined in SlapOS Master for this instance.
......
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