mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
* add test of yum with proxy * Properly handle unauthenticated yum proxy config Fixes #51548 * shell executable is bash
This commit is contained in:
parent
d7fd4d0550
commit
c2a409a9e0
2 changed files with 28 additions and 5 deletions
|
@ -703,7 +703,6 @@ class YumModule(YumDnf):
|
|||
# setting system proxy environment and saving old, if exists
|
||||
my = self.yum_base()
|
||||
namepass = ""
|
||||
proxy_url = ""
|
||||
scheme = ["http", "https"]
|
||||
old_proxy_env = [os.getenv("http_proxy"), os.getenv("https_proxy")]
|
||||
try:
|
||||
|
@ -726,10 +725,7 @@ class YumModule(YumDnf):
|
|||
)
|
||||
else:
|
||||
for item in scheme:
|
||||
os.environ[item + "_proxy"] = re.sub(
|
||||
r"(http://)",
|
||||
r"\g<1>", proxy_url
|
||||
)
|
||||
os.environ[item + "_proxy"] = my.conf.proxy
|
||||
yield
|
||||
except yum.Errors.YumBaseError:
|
||||
raise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue