From b15cc3e2b4bd86e46be8d3a95cd7f3c27a98ae40 Mon Sep 17 00:00:00 2001 From: Timothy Appnel Date: Wed, 8 May 2013 13:55:50 -0400 Subject: [PATCH] Fixed bug where a host entry in the inventory represented as a dict w/o a hosts or vars key was treated as a group and its vars essentially ignored. --- lib/ansible/inventory/script.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/inventory/script.py b/lib/ansible/inventory/script.py index a1ec467ce25..49afef40c77 100644 --- a/lib/ansible/inventory/script.py +++ b/lib/ansible/inventory/script.py @@ -63,6 +63,8 @@ class InventoryScript(object): if not isinstance(data, dict): data = {'hosts': data} + elif not any(k in data for k in ('hosts','vars')): + data = {'hosts': [group_name], 'vars': data} if 'hosts' in data: