1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins
patchback[bot] 303000c1a1
Expose unredirected_headers on maven_artifact (#4812) (#4994)
* Expose unredirected_headers to module

In some cases, when the initial request returns a redirect and we want
to follow it to get the artifact, we might not want to include certain
headers in the redirection request. Specially headers like
Authorization and Cookies.
Or perhaps the redirect server returns a 400 because it included some
unexpected headers.
Fetch url already supports this feature, but it was being shadowed by
maven_artifact. In here we just expose it.

* Fix Linting errors

* Applied Comments

 - Specified version added
 - Changed description of unredirected_headers

* Check for ansible version

If it's 2.11 or older, we ignore unredirected_headers, otherwise we use
it, as fetch_url has them

* Applied comments

- Removed duplicated code in the call of fetch_url. Used kwargs instead
- Added check if unredirected_params is not empty and the fetch_url
  function does not support it
- Changed function that checks for ansible version
- Removed unused import

* Remove 2.11 breaking change

Made default only for ansible-core version 2.12 and above, but for keep
it empty for ansible-core version 2.11 and below.
Also include the following changes:
  - change doc to use C() on the function description
  - changed doc to use ansible-core instead of Ansible

* Changes in description for readability

* Add changelog fragment

* Change description changelog fragment

(cherry picked from commit a2677fd051)

Co-authored-by: Raul Gabriel Verdi <95469166+raul-verdi@users.noreply.github.com>
2022-07-24 12:29:11 +02:00
..
action/system Replace symlinks with meta/runtime.yml redirects. (#4562) 2022-04-26 20:33:13 +02:00
become added password prompt support for machinectl (#4849) (#4941) 2022-07-11 22:08:53 +02:00
cache [5.0.0] Remove Ansible 2.9 / ansible-base 2.10 compatibility code (#4548) 2022-04-26 11:51:01 +02:00
callback allow configuring opentelementry callback via config file (#4916) (#4938) 2022-07-07 22:48:20 +02:00
connection fix lxd connection plugin inventory_hostname (#4912) (#4935) 2022-07-07 22:40:16 +02:00
doc_fragments Add simplified_bsd.txt license file (#4759) (#4761) 2022-06-02 08:01:53 +02:00
filter Misc. typo fixes (#4940) (#4942) 2022-07-11 22:18:22 +02:00
inventory proxmox inventory: fix for agent enabled (#4910) (#4947) 2022-07-12 11:17:40 +02:00
lookup Fix path detection for gopass (#4955) (#4965) 2022-07-21 08:14:30 +02:00
module_utils Redfish modules for Western Digital UltraStar Data102 storage enclosures (#4885) (#4958) 2022-07-17 11:03:55 +02:00
modules Expose unredirected_headers on maven_artifact (#4812) (#4994) 2022-07-24 12:29:11 +02:00
test Document all filter and test plugins (#4597) 2022-05-02 07:25:45 +02:00