mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 03:00:04 -03:30
More .all() fixes re active flag removal
This commit is contained in:
@@ -2142,7 +2142,7 @@ class JobTemplateCallback(GenericAPIView):
|
|||||||
pass
|
pass
|
||||||
# Next, try matching based on name or ansible_ssh_host variable.
|
# Next, try matching based on name or ansible_ssh_host variable.
|
||||||
matches = set()
|
matches = set()
|
||||||
for host in qs:
|
for host in qs.all():
|
||||||
ansible_ssh_host = host.variables_dict.get('ansible_ssh_host', '')
|
ansible_ssh_host = host.variables_dict.get('ansible_ssh_host', '')
|
||||||
if ansible_ssh_host in remote_hosts:
|
if ansible_ssh_host in remote_hosts:
|
||||||
matches.add(host)
|
matches.add(host)
|
||||||
@@ -2152,7 +2152,7 @@ class JobTemplateCallback(GenericAPIView):
|
|||||||
if len(matches) == 1:
|
if len(matches) == 1:
|
||||||
return matches
|
return matches
|
||||||
# Try to resolve forward addresses for each host to find matches.
|
# Try to resolve forward addresses for each host to find matches.
|
||||||
for host in qs:
|
for host in qs.all():
|
||||||
hostnames = set([host.name])
|
hostnames = set([host.name])
|
||||||
ansible_ssh_host = host.variables_dict.get('ansible_ssh_host', '')
|
ansible_ssh_host = host.variables_dict.get('ansible_ssh_host', '')
|
||||||
if ansible_ssh_host:
|
if ansible_ssh_host:
|
||||||
|
|||||||
Reference in New Issue
Block a user