New in version 2.8.
WinHTTP
.Parameter | Choices/Defaults | Comments |
---|---|---|
bypass list | A list of hosts that will bypass the set proxy when being accessed. Use <local> to match hostnames that are not fully qualified domain names. This is useful when needing to connect to intranet sites using just the hostname.Omit, set to null or an empty string/list to remove the bypass list. If this is set then proxy must also be set. | |
proxy - | A string or dict that specifies the proxy to be set. If setting a string, should be in the form hostname , hostname:port , or protocol=hostname:port .If the port is undefined, the default port for the protocol in use is used. If setting a dict, the keys should be the protocol and the values should be the hostname and/or port for that protocol. Valid protocols are http , https , ftp , and socks .Omit, set to null or an empty string to remove the proxy settings. | |
source string |
| Instead of manually specifying the proxy and/or bypass, set this to import the proxy from a set source like Internet Explorer. Using ie will import the Internet Explorer proxy settings for the current active network connection of the current user.Only IE's proxy URL and bypass list will be imported into WinHTTP. This is like running netsh winhttp import proxy source=ie .The value is imported when the module runs and will not automatically be updated if the IE configuration changes in the future. The module will have to be run again to sync the latest changes. |
Note
WinINet
; use the win_inet_proxy module to manage that instead.See also
- name: Set a proxy to use for all protocols win_http_proxy: proxy: hostname - name: Set a proxy with a specific port with a bypass list win_http_proxy: proxy: hostname:8080 bypass: - server1 - server2 - <local> - name: Set the proxy based on the IE proxy settings win_http_proxy: source: ie - name: Set a proxy for specific protocols win_http_proxy: proxy: http: hostname:8080 https: hostname:8443 - name: Set a proxy for specific protocols using a string win_http_proxy: proxy: http=hostname:8080;https=hostname:8443 bypass: server1,server2,<local> - name: Remove any proxy settings win_http_proxy: proxy: '' bypass: ''
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/win_http_proxy_module.html