From 5ad9bc8833097916cba39c804558a23f78a22e53 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Wed, 18 Jul 2012 16:56:41 -0400 Subject: [PATCH] when using -i"hostname," on the cli - don't complain about the host named "" not being a host - just clip it from the list --- lib/ansible/inventory/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index b426aa9e376..c7d6057ea7e 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -53,6 +53,7 @@ class Inventory(object): if type(host_list) in [ str, unicode ]: if host_list.find(",") != -1: host_list = host_list.split(",") + host_list = [ h for h in host_list if h and h.strip() ] if type(host_list) == list: all = Group('all')