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.

pull/2871/head
Timothy Appnel 12 years ago
parent 8ef18c2f98
commit b15cc3e2b4

@ -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:

Loading…
Cancel
Save