diff options
author | Matt Martz <matt@sivel.net> | 2023-01-18 16:23:19 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 16:23:19 -0600 |
commit | 014a1a5715c8c70689657064865ac75dbf2b1617 (patch) | |
tree | d2c753e63d18e3ed2ca27afebd23335392f08414 | |
parent | a8642ef1b057b42220ca2689877ce871e835c5bf (diff) | |
download | ansible-014a1a5715c8c70689657064865ac75dbf2b1617.tar.gz |
[stable-2.14] Ensure we are passing ciphers to all url_get calls (#79718) (#79727)
* Ensure we are passing ciphers to all url_get calls. Fixes #79717
* Add clog frag
* Fix tests
(cherry picked from commit 2143bcd)
Co-authored-by: Matt Martz <matt@sivel.net>
-rw-r--r-- | changelogs/fragments/79717-get-url-ciphers.yml | 2 | ||||
-rw-r--r-- | lib/ansible/modules/get_url.py | 2 | ||||
-rw-r--r-- | test/integration/targets/get_url/tasks/ciphers.yml | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/changelogs/fragments/79717-get-url-ciphers.yml b/changelogs/fragments/79717-get-url-ciphers.yml new file mode 100644 index 0000000000..d685794e2e --- /dev/null +++ b/changelogs/fragments/79717-get-url-ciphers.yml @@ -0,0 +1,2 @@ +bugfixes: +- get_url - Ensure we are passing ciphers to all url_get calls (https://github.com/ansible/ansible/issues/79717) diff --git a/lib/ansible/modules/get_url.py b/lib/ansible/modules/get_url.py index 4cf2715986..eec24241d3 100644 --- a/lib/ansible/modules/get_url.py +++ b/lib/ansible/modules/get_url.py @@ -609,7 +609,7 @@ def main(): start = datetime.datetime.utcnow() method = 'HEAD' if module.check_mode else 'GET' tmpsrc, info = url_get(module, url, dest, use_proxy, last_mod_time, force, timeout, headers, tmp_dest, method, - unredirected_headers=unredirected_headers, decompress=decompress, use_netrc=use_netrc) + unredirected_headers=unredirected_headers, decompress=decompress, ciphers=ciphers, use_netrc=use_netrc) result['elapsed'] = (datetime.datetime.utcnow() - start).seconds result['src'] = tmpsrc diff --git a/test/integration/targets/get_url/tasks/ciphers.yml b/test/integration/targets/get_url/tasks/ciphers.yml index b8ebd9815c..c7d9979d6d 100644 --- a/test/integration/targets/get_url/tasks/ciphers.yml +++ b/test/integration/targets/get_url/tasks/ciphers.yml @@ -6,7 +6,7 @@ register: good_ciphers - name: test bad cipher - uri: + get_url: url: https://{{ httpbin_host }}/get ciphers: ECDHE-ECDSA-AES128-SHA dest: '{{ remote_tmp_dir }}/bad_cipher_get.json' |