diff --git a/changelogs/fragments/10298--keycloak-api-fix-stable9.yml b/changelogs/fragments/10298--keycloak-api-fix-stable9.yml new file mode 100644 index 0000000000..ad54dd4eb0 --- /dev/null +++ b/changelogs/fragments/10298--keycloak-api-fix-stable9.yml @@ -0,0 +1,2 @@ +bugfixes: + - "keycloak module_utils - fix call of method which does not exist in stable-9, which was introduced by backporting 8b1a193a (https://github.com/ansible-collections/community.general/pull/10298)." diff --git a/plugins/module_utils/identity/keycloak/keycloak.py b/plugins/module_utils/identity/keycloak/keycloak.py index 02465a70fa..c63f668c6a 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -2236,14 +2236,17 @@ class KeycloakAPI(object): """ try: # Send a DELETE request to remove the specified authentication config from the Keycloak server. - self._request( + open_url( URL_AUTHENTICATION_CONFIG.format( url=self.baseurl, realm=realm, id=configId), - method='DELETE') + method='DELETE', + http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, + validate_certs=self.validate_certs) except Exception as e: - self.fail_request(e, msg="Unable to delete authentication config %s: %s" % (configId, str(e))) + self.fail_open_url(e, msg="Unable to delete authentication config %s: %s" % (configId, str(e))) def create_subflow(self, subflowName, flowAlias, realm='master', flowType='basic-flow'): """ Create new sublow on the flow