mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
Stale comment cleanup
This commit is contained in:
@@ -2479,7 +2479,6 @@ class JobTemplateCallback(GenericAPIView):
|
|||||||
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)
|
||||||
# FIXME: Not entirely sure if this statement will ever be needed?
|
|
||||||
if host.name != ansible_ssh_host and host.name in remote_hosts:
|
if host.name != ansible_ssh_host and host.name in remote_hosts:
|
||||||
matches.add(host)
|
matches.add(host)
|
||||||
if len(matches) == 1:
|
if len(matches) == 1:
|
||||||
@@ -2549,17 +2548,14 @@ class JobTemplateCallback(GenericAPIView):
|
|||||||
# Check matching hosts.
|
# Check matching hosts.
|
||||||
if not matching_hosts:
|
if not matching_hosts:
|
||||||
data = dict(msg='No matching host could be found!')
|
data = dict(msg='No matching host could be found!')
|
||||||
# FIXME: Log!
|
|
||||||
return Response(data, status=status.HTTP_400_BAD_REQUEST)
|
return Response(data, status=status.HTTP_400_BAD_REQUEST)
|
||||||
elif len(matching_hosts) > 1:
|
elif len(matching_hosts) > 1:
|
||||||
data = dict(msg='Multiple hosts matched the request!')
|
data = dict(msg='Multiple hosts matched the request!')
|
||||||
# FIXME: Log!
|
|
||||||
return Response(data, status=status.HTTP_400_BAD_REQUEST)
|
return Response(data, status=status.HTTP_400_BAD_REQUEST)
|
||||||
else:
|
else:
|
||||||
host = list(matching_hosts)[0]
|
host = list(matching_hosts)[0]
|
||||||
if not job_template.can_start_without_user_input():
|
if not job_template.can_start_without_user_input():
|
||||||
data = dict(msg='Cannot start automatically, user input required!')
|
data = dict(msg='Cannot start automatically, user input required!')
|
||||||
# FIXME: Log!
|
|
||||||
return Response(data, status=status.HTTP_400_BAD_REQUEST)
|
return Response(data, status=status.HTTP_400_BAD_REQUEST)
|
||||||
limit = host.name
|
limit = host.name
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user