mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
Set SDB_NOTIFY_HOST on non-docker OS X
This commit is contained in:
parent
e7a9604896
commit
cd07305c08
@ -10,6 +10,7 @@ import copy
|
||||
import sys
|
||||
import traceback
|
||||
import uuid
|
||||
import platform
|
||||
|
||||
# Centos-7 doesn't include the svg mime type
|
||||
# /usr/lib64/python/mimetypes.py
|
||||
@ -176,7 +177,10 @@ CLUSTER_HOST_ID = socket.gethostname()
|
||||
if 'Docker Desktop' in os.getenv('OS', ''):
|
||||
os.environ['SDB_NOTIFY_HOST'] = 'docker.for.mac.host.internal'
|
||||
else:
|
||||
os.environ['SDB_NOTIFY_HOST'] = os.popen('ip route').read().split(' ')[2]
|
||||
if platform.system() == 'Darwin':
|
||||
os.environ['SDB_NOTIFY_HOST'] = os.popen('ipconfig getifaddr en0').read().strip()
|
||||
else:
|
||||
os.environ['SDB_NOTIFY_HOST'] = os.popen('ip route').read().split(' ')[2]
|
||||
|
||||
WEBSOCKET_ORIGIN_WHITELIST = ['https://localhost:8043', 'https://localhost:3000']
|
||||
AWX_CALLBACK_PROFILE = True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user