Fix a bug in nodes_to_inv.py
This commit is contained in:
parent
8d3abdb489
commit
c4e3266031
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue