Add use_proxy option to httpapi (#59259)

This commit is contained in:
Nathaniel Case 2019-08-23 13:07:52 -04:00 committed by GitHub
parent c9f0b0fb42
commit 64312a09c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,6 +77,14 @@ options:
default: True
vars:
- name: ansible_httpapi_validate_certs
use_proxy:
type: boolean
version_added: "2.9"
description:
- Whether to use https_proxy for requests.
default: True
vars:
- name: ansible_httpapi_use_proxy
timeout:
type: int
description:
@ -257,6 +265,7 @@ class Connection(NetworkConnectionBase):
'''
url_kwargs = dict(
timeout=self.get_option('timeout'), validate_certs=self.get_option('validate_certs'),
use_proxy=self.get_option("use_proxy"),
headers={},
)
url_kwargs.update(kwargs)