diff --git a/software/apache-frontend/instance-apache-replicate.cfg.in b/software/apache-frontend/instance-apache-replicate.cfg.in index c1fd7bae29fc6740cff7a15412d2871c36409456..6bb78825c54f11a7438e48f5f31443ce3942a115 100644 --- a/software/apache-frontend/instance-apache-replicate.cfg.in +++ b/software/apache-frontend/instance-apache-replicate.cfg.in @@ -1,4 +1,4 @@ -{% if software_type == slap_software_type -%} +{% if slap_software_type.startswith(software_type) -%} [jinja2-template-base] recipe = slapos.recipe.template:jinja2 @@ -13,7 +13,13 @@ context = ${:extra-context} {% set part_list = [] -%} -{% set frontend_type = slapparameter_dict.pop('-frontend-type', 'default') -%} +{% set type_key = 'replicate-' %} +{% set type_key_length = type_key | length %} +{% if slap_software_type.startswith(type_key) %} +{% set frontend_type = slap_software_type[type_key_length:] -%} +{% else -%} +{% set frontend_type = slapparameter_dict.pop('-frontend-type', 'default') -%} +{% endif -%} {% set frontend_quantity = slapparameter_dict.pop('-frontend-quantity', '2') | int -%} {% set slave_list_name = 'extra_slave_instance_list' -%} {% set frontend_list = [] %} diff --git a/software/apache-frontend/instance.cfg b/software/apache-frontend/instance.cfg index 519423fb1160ad222f047b2883029c3e6ab7f8ae..625de0e966e65e3c82dc55f64a527aba5db3c095 100644 --- a/software/apache-frontend/instance.cfg +++ b/software/apache-frontend/instance.cfg @@ -33,6 +33,9 @@ recipe = slapos.cookbook:softwaretype default = ${template-apache-frontend:output} custom-personal = ${template-apache-frontend:output} custom-group = ${template-apache-frontend:output} +replicate-default = $${dynamic-template-apache-replicate:rendered} +replicate-custom-personal = $${dynamic-template-apache-replicate:rendered} +replicate-custom-group = $${dynamic-template-apache-replicate:rendered} replicate = $${dynamic-template-apache-replicate:rendered} [dynamic-template-apache-replicate]