From befa8a6cbd5dc6a28d6c2f27b1f68a806f484f8f Mon Sep 17 00:00:00 2001
From: tikitavi <rtikitavi@gmail.com>
Date: Mon, 11 Feb 2019 15:57:51 +0300
Subject: [PATCH] fix error with delete host in inventory.py script (#4203)

* fix error with delete host in inventory.py script

* minor fix
---
 contrib/inventory_builder/inventory.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/inventory_builder/inventory.py b/contrib/inventory_builder/inventory.py
index df1307f78..0878849dc 100644
--- a/contrib/inventory_builder/inventory.py
+++ b/contrib/inventory_builder/inventory.py
@@ -190,7 +190,7 @@ class KubesprayInventory(object):
             return [ip_address(ip).exploded for ip in range(start, end+1)]
 
         for host in hosts:
-            if '-' in host:
+            if '-' in host and not host.startswith('-'):
                 start, end = host.strip().split('-')
                 try:
                     reworked_hosts.extend(ips(start, end))
-- 
GitLab