Review requests

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/83169/head
Abhijeet Kasurde 1 month ago
parent 0c4cbe7856
commit e0866f41c8

@ -108,16 +108,15 @@ options:
follow_redirects:
description:
- Whether or not the URI module should follow redirects.
- V(all) will follow all redirects.
- V(safe) will follow only "safe" redirects, where "safe" means that the client is only
doing a GET or HEAD on the URI to which it is being redirected.
- V(none) will not follow any redirects.
- Note that V(true) and V(false) choices are accepted for backwards compatibility,
where V(true) is the equivalent of V(all) and V(false) is the equivalent of V(safe).
V(true) and V(false) are deprecated and will be removed in Ansible 2.22.
type: str
choices: ['all', 'no', 'none', 'safe', 'urllib2', 'yes']
default: safe
choices:
all: Will follow all redirects.
none: Will not follow any redirects.
safe: Only redirects doing GET or HEAD requests will be followed.
urllib2: Automatically follows HTTP redirects.
no: (DEPRECATED, removed in 2.22) alias of V(none).
yes: (DEPRECATED, removed in 2.22) alias of V(all).
creates:
description:
- A filename, when it already exists, this step will not be run.

@ -99,12 +99,12 @@ options:
- section: url_lookup
key: follow_redirects
choices:
- urllib2
- all
- 'yes'
- safe
- none
- 'no'
all: Will follow all redirects.
none: Will not follow any redirects.
safe: Only redirects doing GET or HEAD requests will be followed.
urllib2: Automatically follows HTTP redirects.
no: (DEPRECATED, removed in 2.22) alias of V(none).
yes: (DEPRECATED, removed in 2.22) alias of V(all).
use_gssapi:
description:
- Use GSSAPI handler of requests
@ -234,6 +234,11 @@ class LookupModule(LookupBase):
ret = []
for term in terms:
display.vvvv("url lookup connecting to %s" % term)
if self.get_option('follow_redirects') in ('yes', 'no'):
display.deprecated(
"Using 'yes' or 'no' for 'follow_redirects' parameter is deprecated.",
version='2.22'
)
try:
response = open_url(
term, validate_certs=self.get_option('validate_certs'),

Loading…
Cancel
Save