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))