From c4e32660318bc3803e15c676b620f756d5ad0b85 Mon Sep 17 00:00:00 2001 From: Aleksandr Didenko Date: Fri, 8 Jul 2016 17:22:52 +0200 Subject: [PATCH] Fix a bug in nodes_to_inv.py --- nodes_to_inv.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nodes_to_inv.py b/nodes_to_inv.py index 3242686cc..1faf9a70a 100755 --- a/nodes_to_inv.py +++ b/nodes_to_inv.py @@ -29,6 +29,7 @@ def nodes_to_hash(nodes_list, masters): 'children': ['kube-node', 'kube-master'] } } + i = 1 for node_ip in nodes_list: 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) if i <= 3: nodes['etcd']['hosts'].append("%s" % node_ip) + i += 1 return nodes