mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
properly filter disabled hosts on smart inventory composition
see: #1053 related: https://github.com/ansible/tower/pull/1155
This commit is contained in:
parent
7842b67bea
commit
c1cc92afa0
@ -2408,7 +2408,7 @@ class InventoryScriptView(RetrieveAPIView):
|
||||
return Response({})
|
||||
else:
|
||||
all_group = data.setdefault('all', dict())
|
||||
smart_hosts_qs = obj.hosts.all()
|
||||
smart_hosts_qs = obj.hosts.filter(**hosts_q).all()
|
||||
smart_hosts = list(smart_hosts_qs.values_list('name', flat=True))
|
||||
all_group['hosts'] = smart_hosts
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user