From 73b2683697a663636df13753901ceb3575983573 Mon Sep 17 00:00:00 2001
From: Florian Ruynat <florian234@hotmail.com>
Date: Tue, 18 Aug 2020 09:53:30 +0200
Subject: [PATCH] Allow hosts with hyphen in name (#6529)

---
 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 95d5eac0b..6373317d2 100644
--- a/contrib/inventory_builder/inventory.py
+++ b/contrib/inventory_builder/inventory.py
@@ -238,7 +238,7 @@ class KubesprayInventory(object):
             return [ip_address(ip).exploded for ip in range(start, end + 1)]
 
         for host in hosts:
-            if '-' in host and not host.startswith('-'):
+            if '-' in host and not (host.startswith('-') or host[0].isalpha()):
                 start, end = host.strip().split('-')
                 try:
                     reworked_hosts.extend(ips(start, end))
-- 
GitLab