mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
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.
This commit is contained in:
@@ -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:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user