Merge pull request #2614 from stokkie90/devel

Fixed bug where all group variables are not included

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot]
2018-11-08 12:27:30 +00:00
committed by GitHub
3 changed files with 19 additions and 1 deletions

View File

@@ -294,6 +294,8 @@ 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)