From f140332ff6a1d654903c82e473a3bd29fae773ee Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 30 Aug 2012 19:51:46 -0400 Subject: [PATCH] Make it possible in the inventory file to have spaces in host variables --- lib/ansible/inventory/ini.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/inventory/ini.py b/lib/ansible/inventory/ini.py index 8251d08697..fafe0b5023 100644 --- a/lib/ansible/inventory/ini.py +++ b/lib/ansible/inventory/ini.py @@ -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]