mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make it possible in the inventory file to have spaces in host variables
This commit is contained in:
parent
8e02b165f1
commit
f140332ff6
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ from ansible.inventory.group import Group
|
|||
from ansible.inventory.expand_hosts import detect_range
|
||||
from ansible.inventory.expand_hosts import expand_hostname_range
|
||||
from ansible import errors
|
||||
|
||||
import shlex
|
||||
|
||||
class InventoryParser(object):
|
||||
"""
|
||||
|
@ -73,7 +73,7 @@ class InventoryParser(object):
|
|||
elif line.startswith("#") or line == '':
|
||||
pass
|
||||
elif active_group_name:
|
||||
tokens = line.split()
|
||||
tokens = shlex.split(line)
|
||||
if len(tokens) == 0:
|
||||
continue
|
||||
hostname = tokens[0]
|
||||
|
|
Loading…
Reference in a new issue