Fix a bug in nodes_to_inv.py

This commit is contained in:
Aleksandr Didenko 2016-07-08 17:22:52 +02:00
parent 8d3abdb489
commit c4e3266031

View file

@ -29,6 +29,7 @@ def nodes_to_hash(nodes_list, masters):
'children': ['kube-node', 'kube-master'] 'children': ['kube-node', 'kube-master']
} }
} }
i = 1
for node_ip in nodes_list: for node_ip in nodes_list:
nodes['all']['hosts'].append("%s" % node_ip) nodes['all']['hosts'].append("%s" % node_ip)
@ -37,6 +38,7 @@ def nodes_to_hash(nodes_list, masters):
nodes['kube-master']['hosts'].append("%s" % node_ip) nodes['kube-master']['hosts'].append("%s" % node_ip)
if i <= 3: if i <= 3:
nodes['etcd']['hosts'].append("%s" % node_ip) nodes['etcd']['hosts'].append("%s" % node_ip)
i += 1
return nodes return nodes