From 945a5e708c3cc4eb9ba54d67cec0f20bdda854a0 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Thu, 7 Nov 2024 07:44:04 +0100 Subject: [PATCH] redhat_manifest: drop Ansible pre 2.9 special casing --- plugins/modules/redhat_manifest.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/plugins/modules/redhat_manifest.py b/plugins/modules/redhat_manifest.py index c4293220c1..b8265246bd 100644 --- a/plugins/modules/redhat_manifest.py +++ b/plugins/modules/redhat_manifest.py @@ -154,16 +154,7 @@ def fetch_portal(module, path, method, data=None, accept_header='application/jso fetch_kwargs = {'timeout': 30} if os.path.exists(REDHAT_UEP): fetch_kwargs['ca_path'] = REDHAT_UEP - try: - resp, info = fetch_url(module, url, data, headers, method, **fetch_kwargs) - except TypeError: - # ca_path was added in Ansible 2.9 and backported to 2.8 in 2.8.6 - # older Ansible releases don't support that and we have to omit the CA cert here - if module.params['validate_certs']: - module.warn("Your Ansible version does not support providing custom CA certificates for HTTP requests. " - "Talking to the Red Hat portal might fail without validate_certs=False. Please update.") - del fetch_kwargs['ca_path'] - resp, info = fetch_url(module, url, data, headers, method, **fetch_kwargs) + resp, info = fetch_url(module, url, data, headers, method, **fetch_kwargs) if resp is None or info["status"] >= 400: try: error = json.loads(info['body'])['displayMessage']