mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #8936 from srvg/inventoryscript_onlychildren
Allow InventoryScript JSON with childgroups only
This commit is contained in:
commit
c3d34a5386
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ class InventoryScript(object):
|
|||
if not isinstance(data, dict):
|
||||
data = {'hosts': data}
|
||||
# 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}
|
||||
|
||||
if 'hosts' in data:
|
||||
|
|
Loading…
Reference in a new issue