mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add proxy_username/password and doc for the minion
This commit is contained in:
parent
63a83193c1
commit
a2c6592d60
2 changed files with 14 additions and 2 deletions
|
@ -15,6 +15,12 @@
|
|||
# resolved, then the minion will fail to start.
|
||||
#master: salt
|
||||
|
||||
# Set http proxy information for the minion when doing requests
|
||||
#proxy_host:
|
||||
#proxy_port:
|
||||
#proxy_username:
|
||||
#proxy_password:
|
||||
|
||||
# If multiple masters are specified in the 'master' setting, the default behavior
|
||||
# is to always try to connect to them in the order they are listed. If random_master is
|
||||
# set to True, the order will be randomized instead. This can be helpful in distributing
|
||||
|
|
|
@ -425,8 +425,10 @@ def query(url,
|
|||
|
||||
client_argspec = None
|
||||
|
||||
proxy_host = opts.get('proxy_host', None)
|
||||
proxy_port = opts.get('proxy_port', None)
|
||||
proxy_host = opts.get('proxy_host', None)
|
||||
proxy_port = opts.get('proxy_port', None)
|
||||
proxy_username = opts.get('proxy_username', None)
|
||||
proxy_password = opts.get('proxy_password', None)
|
||||
|
||||
# We want to use curl_http if we have a proxy defined
|
||||
if proxy_host and proxy_port:
|
||||
|
@ -452,6 +454,8 @@ def query(url,
|
|||
request_timeout=timeout,
|
||||
proxy_host=proxy_host,
|
||||
proxy_port=proxy_port,
|
||||
proxy_username=proxy_username,
|
||||
proxy_password=proxy_password,
|
||||
**req_kwargs
|
||||
)
|
||||
else:
|
||||
|
@ -468,6 +472,8 @@ def query(url,
|
|||
request_timeout=timeout,
|
||||
proxy_host=proxy_host,
|
||||
proxy_port=proxy_port,
|
||||
proxy_username=proxy_username,
|
||||
proxy_password=proxy_password,
|
||||
**req_kwargs
|
||||
)
|
||||
except tornado.httpclient.HTTPError as exc:
|
||||
|
|
Loading…
Add table
Reference in a new issue