From 0862511e82ddf828aa223a673e2b3c840ca65676 Mon Sep 17 00:00:00 2001 From: dsmackie <48046804+dsmackie@users.noreply.github.com> Date: Thu, 7 Sep 2023 02:40:49 +0930 Subject: [PATCH] Ensure pritunl validate_certs is honoured in all methods (#7156) * Ensure pritunl validate_certs is honoured in all methods * Create changelog fragment * Rename 7156-ensure-validate-certs-parameter-is-honoured to 7156-ensure-validate-certs-parameter-is-honoured.yml * Update changelog fragment. --------- Co-authored-by: Felix Fontein --- ...156-ensure-validate-certs-parameter-is-honoured.yml | 2 ++ plugins/module_utils/net_tools/pritunl/api.py | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/7156-ensure-validate-certs-parameter-is-honoured.yml diff --git a/changelogs/fragments/7156-ensure-validate-certs-parameter-is-honoured.yml b/changelogs/fragments/7156-ensure-validate-certs-parameter-is-honoured.yml new file mode 100644 index 0000000000..630b2ec885 --- /dev/null +++ b/changelogs/fragments/7156-ensure-validate-certs-parameter-is-honoured.yml @@ -0,0 +1,2 @@ +minor_changes: +- pritunl module utils - ensure ``validate_certs`` parameter is honoured in all methods (https://github.com/ansible-collections/community.general/pull/7156). diff --git a/plugins/module_utils/net_tools/pritunl/api.py b/plugins/module_utils/net_tools/pritunl/api.py index 9ae82df8b3..be3bbe16f7 100644 --- a/plugins/module_utils/net_tools/pritunl/api.py +++ b/plugins/module_utils/net_tools/pritunl/api.py @@ -220,7 +220,7 @@ def post_pritunl_organization( api_secret=api_secret, base_url=base_url, organization_data={"name": organization_name}, - validate_certs=True, + validate_certs=validate_certs, ) if response.getcode() != 200: @@ -248,7 +248,7 @@ def post_pritunl_user( base_url=base_url, organization_id=organization_id, user_data=user_data, - validate_certs=True, + validate_certs=validate_certs, ) if response.getcode() != 200: @@ -267,7 +267,7 @@ def post_pritunl_user( organization_id=organization_id, user_data=user_data, user_id=user_id, - validate_certs=True, + validate_certs=validate_certs, ) if response.getcode() != 200: @@ -287,7 +287,7 @@ def delete_pritunl_organization( api_secret=api_secret, base_url=base_url, organization_id=organization_id, - validate_certs=True, + validate_certs=validate_certs, ) if response.getcode() != 200: @@ -307,7 +307,7 @@ def delete_pritunl_user( base_url=base_url, organization_id=organization_id, user_id=user_id, - validate_certs=True, + validate_certs=validate_certs, ) if response.getcode() != 200: