Commit 5495d135 authored by Łukasz Nowak's avatar Łukasz Nowak

XXX kvm: Make all values buildout-safe

XXX: Need tests for authorized-key various cases.
parent 0f2362c4
...@@ -19,7 +19,7 @@ md5sum = e6d5c7bb627b4f1d3e7c99721b7c58fe ...@@ -19,7 +19,7 @@ md5sum = e6d5c7bb627b4f1d3e7c99721b7c58fe
[template-kvm] [template-kvm]
filename = instance-kvm.cfg.jinja2 filename = instance-kvm.cfg.jinja2
md5sum = 31b17b55200ea065cb97085283ef5568 md5sum = 6824c05642a3f18bb7e26b943ee83949
[template-kvm-cluster] [template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in filename = instance-kvm-cluster.cfg.jinja2.in
......
...@@ -971,17 +971,9 @@ data-to-vm = ...@@ -971,17 +971,9 @@ data-to-vm =
# Change keyboard layout language (Change to en-us if you face some bad bihaviors) # Change keyboard layout language (Change to en-us if you face some bad bihaviors)
keyboard-layout-language = fr keyboard-layout-language = fr
{% for k, v in slapparameter_dict.items() -%} {% for key, value in slapparameter_dict.items() -%}
{% if k == 'authorized-key' and v -%} {#- dumps value to make it representation buldout safe #}
{% set key_list = v.split('\n') -%} {{ key }} = {{ dumps(value) }}
{{ k }} =
{{ key_list | join('\n ') }}
{% elif k == 'boot-image-url-list' %}
{# needs to decorate possibly multiline or maybe unsafe value #}
{{ k }} = {{ dumps(v) }}
{% else -%}
{{ k }} = {{ v }}
{% endif -%}
{% 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