mirror of
https://github.com/ansible/awx.git
synced 2026-04-20 17:32:53 -02:30
Save hostnames, not IP addresses, for HA.
This commit is contained in:
@@ -156,9 +156,9 @@ class ApiV1PingView(APIView):
|
||||
# Add all of the instances into the structure.
|
||||
for instance in Instance.objects.all():
|
||||
if instance.primary:
|
||||
response['instances']['primary'] = instance.ip_address
|
||||
response['instances']['primary'] = instance.hostname
|
||||
else:
|
||||
response['instances']['secondaries'].append(instance.ip_address)
|
||||
response['instances']['secondaries'].append(instance.hostname)
|
||||
response['instances']['secondaries'].sort()
|
||||
|
||||
# Done; return the response.
|
||||
|
||||
Reference in New Issue
Block a user