mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 02:17:37 -02:30
Fixed test cases
This commit is contained in:
@@ -294,12 +294,11 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin, RelatedJobsMixin):
|
||||
|
||||
# Remove any empty groups
|
||||
for group_name in list(data.keys()):
|
||||
if group_name == 'all':
|
||||
continue
|
||||
if not (data.get(group_name, {}).get('hosts', []) or data.get(group_name, {}).get('children', [])):
|
||||
data.pop(group_name)
|
||||
|
||||
# Add the all group
|
||||
data['all'] = all_group
|
||||
|
||||
if hostvars:
|
||||
data.setdefault('_meta', dict())
|
||||
data['_meta'].setdefault('hostvars', dict())
|
||||
|
||||
Reference in New Issue
Block a user