[buildout]
parts =
  switch-softwaretype

eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true

[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}

[dynamic-template-caucase]
recipe = slapos.recipe.template:jinja2
filename = ${:_buildout_section_name_}.cfg
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
template = {{ caucase_template }}
extensions = jinja2.ext.do
extra-context =
context =
    key ipv4 slap-configuration:ipv4
    key ipv6 slap-configuration:ipv6
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    key slapparameter_dict slap-configuration:configuration
    raw gunicorn_bin {{ gunicorn_bin }}
    raw template_logrotate_base {{ template_logrotate_base }}
    raw certificate_request_bin {{ certificate_request_bin }}
    raw template_nginx_ca_conf {{ template_nginx_ca_conf }}
    raw nginx_location {{ nginx_location }}
    raw slapos_kill_bin {{ slapos_kill_bin }}
    raw dash_executable_location {{ dash_executable_location }}
    raw curl_executable_location {{ curl_executable_location }}
    raw publish_parameter yes

[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${dynamic-template-caucase:rendered}

