Commit f140332f by Michael DeHaan

Make it possible in the inventory file to have spaces in host variables

parent 8e02b165
...@@ -23,7 +23,7 @@ from ansible.inventory.group import Group ...@@ -23,7 +23,7 @@ from ansible.inventory.group import Group
from ansible.inventory.expand_hosts import detect_range from ansible.inventory.expand_hosts import detect_range
from ansible.inventory.expand_hosts import expand_hostname_range from ansible.inventory.expand_hosts import expand_hostname_range
from ansible import errors from ansible import errors
import shlex
class InventoryParser(object): class InventoryParser(object):
""" """
...@@ -73,7 +73,7 @@ class InventoryParser(object): ...@@ -73,7 +73,7 @@ class InventoryParser(object):
elif line.startswith("#") or line == '': elif line.startswith("#") or line == '':
pass pass
elif active_group_name: elif active_group_name:
tokens = line.split() tokens = shlex.split(line)
if len(tokens) == 0: if len(tokens) == 0:
continue continue
hostname = tokens[0] hostname = tokens[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment