labelvalue must be formatted to handle non string values (#2722)

This commit is contained in:
mirwan 2018-04-29 18:02:14 +02:00 committed by Matthew Mosesohn
parent c3c5817af6
commit 06cdb260f6

View file

@ -95,9 +95,9 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
{% endif %} {% endif %}
{% set inventory_node_labels = [] %} {% set inventory_node_labels = [] %}
{% if node_labels is defined %} {% if node_labels is defined %}
{% for labelname, labelvalue in node_labels.iteritems() %} {% for labelname, labelvalue in node_labels.iteritems() %}
{% set dummy = inventory_node_labels.append(labelname + '=' + labelvalue) %} {% set dummy = inventory_node_labels.append('%s=%s'|format(labelname, labelvalue)) %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% set all_node_labels = role_node_labels + inventory_node_labels %} {% set all_node_labels = role_node_labels + inventory_node_labels %}