mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #2871 from tima/inv-host-entry-fix
Fixed bug where a host entry in the inventory represented as a dict w/o ...
This commit is contained in:
commit
344a30938c
1 changed files with 2 additions and 0 deletions
|
@ -63,6 +63,8 @@ class InventoryScript(object):
|
||||||
|
|
||||||
if not isinstance(data, dict):
|
if not isinstance(data, dict):
|
||||||
data = {'hosts': data}
|
data = {'hosts': data}
|
||||||
|
elif not any(k in data for k in ('hosts','vars')):
|
||||||
|
data = {'hosts': [group_name], 'vars': data}
|
||||||
|
|
||||||
if 'hosts' in data:
|
if 'hosts' in data:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue