More .all() fixes re active flag removal

This commit is contained in:
Akita Noek
2016-03-22 22:23:32 -04:00
parent 6323e023dc
commit fc25cb7e95

View File

@@ -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: