mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-19 14:57:43 -02:30
Allow hosts with hyphen in name (#6529)
This commit is contained in:
@@ -238,7 +238,7 @@ class KubesprayInventory(object):
|
|||||||
return [ip_address(ip).exploded for ip in range(start, end + 1)]
|
return [ip_address(ip).exploded for ip in range(start, end + 1)]
|
||||||
|
|
||||||
for host in hosts:
|
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('-')
|
start, end = host.strip().split('-')
|
||||||
try:
|
try:
|
||||||
reworked_hosts.extend(ips(start, end))
|
reworked_hosts.extend(ips(start, end))
|
||||||
|
|||||||
Reference in New Issue
Block a user