Merge pull request #13766 from nflx/devel

Allow InventoryScript JSON with childgroups only
pull/13813/head
Brian Coca 9 years ago
commit f56c15e7e2

@ -103,7 +103,7 @@ class InventoryScript:
if not isinstance(data, dict): if not isinstance(data, dict):
data = {'hosts': data} data = {'hosts': data}
# is not those subkeys, then simplified syntax, host with vars # is not those subkeys, then simplified syntax, host with vars
elif not any(k in data for k in ('hosts','vars')): elif not any(k in data for k in ('hosts','vars','children')):
data = {'hosts': [group_name], 'vars': data} data = {'hosts': [group_name], 'vars': data}
if 'hosts' in data: if 'hosts' in data:

Loading…
Cancel
Save