mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 17:17:45 -02:30
Co-authored-by: Seth Foster <fosterseth@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,7 @@ import time
|
||||
import re
|
||||
from json import loads, dumps
|
||||
from os.path import isfile, expanduser, split, join, exists, isdir
|
||||
from os import access, R_OK, getcwd
|
||||
from os import access, R_OK, getcwd, environ
|
||||
|
||||
|
||||
try:
|
||||
@@ -131,6 +131,8 @@ class ControllerModule(AnsibleModule):
|
||||
self.url.hostname.replace(char, "")
|
||||
# Try to resolve the hostname
|
||||
try:
|
||||
proxy_env_var_name = "{0}_proxy".format(self.url.scheme)
|
||||
if not environ.get(proxy_env_var_name) and not environ.get(proxy_env_var_name.upper()):
|
||||
addrinfolist = getaddrinfo(self.url.hostname, self.url.port, proto=IPPROTO_TCP)
|
||||
for family, kind, proto, canonical, sockaddr in addrinfolist:
|
||||
sockaddr[0]
|
||||
|
||||
Reference in New Issue
Block a user