Commit 49cd271e authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

stack/resilient: pass all parameters to all requested instances

parent e13fb019
...@@ -30,7 +30,7 @@ md5sum = 382d9b57faac92da3c723760f2210c13 ...@@ -30,7 +30,7 @@ md5sum = 382d9b57faac92da3c723760f2210c13
[template-replicated] [template-replicated]
filename = template-replicated.cfg.in filename = template-replicated.cfg.in
md5sum = 1b25afe215e45a92e0988ea2ca9484f4 md5sum = bf8d24182238acdc8373dc7a4ea0377a
[template-parts] [template-parts]
filename = template-parts.cfg.in filename = template-parts.cfg.in
......
...@@ -26,6 +26,16 @@ bin = ${:home}/bin ...@@ -26,6 +26,16 @@ bin = ${:home}/bin
recipe = slapos.cookbook:request recipe = slapos.cookbook:request
config-namebase = {{namebase}} config-namebase = {{namebase}}
software-url = ${slap-connection:software-release-url} software-url = ${slap-connection:software-release-url}
# Bubble up all the instance parameters to the requested instances.
{% if slapparameter_dict is defined %}
{% for parameter_name, parameter_value in six.iteritems(slapparameter_dict) %}
{% if parameter_value is string %}
config-{{parameter_name}} = {{ parameter_value.split('\n') | join('\n ') }}
{% else %}
config-{{parameter_name}} = {{ parameter_value }}
{% endif %}
{% endfor %}
{% endif %}
[request-{{namebase}}] [request-{{namebase}}]
<= resilient <= resilient
...@@ -39,16 +49,6 @@ config-number = 0 ...@@ -39,16 +49,6 @@ config-number = 0
config-authorized-key = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}{% endfor %} config-authorized-key = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}{% endfor %}
config-notify = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-notification-url}{% endfor %} config-notify = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-notification-url}{% endfor %}
config-name = {{namebase}}0 config-name = {{namebase}}0
# Bubble up all the instance parameters to the requested export instance.
{% if slapparameter_dict is defined %}
{% for parameter_name, parameter_value in six.iteritems(slapparameter_dict) %}
{% if parameter_value is string %}
config-{{parameter_name}} = {{ parameter_value.split('\n') | join('\n ') }}
{% else %}
config-{{parameter_name}} = {{ parameter_value }}
{% endif %}
{% endfor %}
{% endif %}
{% for key, value in six.iteritems(monitor_dict) -%} {% for key, value in six.iteritems(monitor_dict) -%}
config-{{ key }} = {{ value }} config-{{ key }} = {{ value }}
{% endfor -%} {% endfor -%}
......
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