mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
yum: handle "_none_" value for proxy (#56725)
* yum: handle "_none_" value for proxy Fixes #56538 * Fix sanity check
This commit is contained in:
parent
8f4f3750fe
commit
7b9d7e6b5c
2 changed files with 4 additions and 1 deletions
2
changelogs/fragments/56538-yum-handle-proxy-conf.yaml
Normal file
2
changelogs/fragments/56538-yum-handle-proxy-conf.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- 'yum - handle special "_none_" value for proxy in yum.conf and .repo files (https://github.com/ansible/ansible/issues/56538)'
|
|
@ -728,7 +728,8 @@ class YumModule(YumDnf):
|
|||
scheme = ["http", "https"]
|
||||
old_proxy_env = [os.getenv("http_proxy"), os.getenv("https_proxy")]
|
||||
try:
|
||||
if my.conf.proxy:
|
||||
# "_none_" is a special value to disable proxy in yum.conf/*.repo
|
||||
if my.conf.proxy and my.conf.proxy not in ("_none_",):
|
||||
if my.conf.proxy_username:
|
||||
namepass = namepass + my.conf.proxy_username
|
||||
proxy_url = my.conf.proxy
|
||||
|
|
Loading…
Reference in a new issue