-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a support for a global proxy to pip module #55596
Conversation
80d07b4
to
a17b393
Compare
salt/modules/pip.py
Outdated
.. note:: | ||
If the the Minion has a globaly configured proxy - it will be used | ||
even if no proxy was set here. To explicitly disable proxy for pip | ||
you should pass the ``False`` as a value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'you should pass False
as'...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tx. done
27e471d
to
8f7ef15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also do something like:
elif proxy is not False and config.get('proxy_host') and config.get('proxy_port'):
if config.get('proxy_username') and config.get('proxy_password'):
http_proxy_url = 'http://{proxy_username}:{proxy_password}@{proxy_host}:{proxy_port}'.format(**config)
else:
http_proxy_url = 'http://{proxy_host}:{proxy_port}'.format(**config)
8f7ef15
to
2619434
Compare
@s0undt3ch Very cool, added! |
re-run full opensuse15-py2 |
re-run full ubuntu1604-py2 |
re-run full macosxmojave-py2 |
re-run full windows2019-py3 |
Nitpick: it is worth documenting that the |
What does this PR do?
Added support for a global Salt proxy to pip module
What issues does this PR fix or reference?
#55593
Previous Behavior
pip module and state doesn't support salt global proxy
New Behavior
pip module and state does support salt global proxy
Tests written?
Yes
Commits signed with GPG?
Yes