From d2ccf906104bc6d25b80e874d30101a4814907af Mon Sep 17 00:00:00 2001 From: mj84 Date: Mon, 1 Jul 2019 13:22:40 +0200 Subject: [PATCH] Added missing SSL parameters to rabbitmq_binding (#58064) In rabbitmq_binding.py the SSL parameters ca_cert, client_cert, client_key were only passed to requests for post requests. This change updates the DELETE and GET requests to include these parameters as well. --- changelogs/fragments/58064-rabbitmq_binding_ssl_options.yaml | 2 ++ lib/ansible/modules/messaging/rabbitmq/rabbitmq_binding.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/58064-rabbitmq_binding_ssl_options.yaml diff --git a/changelogs/fragments/58064-rabbitmq_binding_ssl_options.yaml b/changelogs/fragments/58064-rabbitmq_binding_ssl_options.yaml new file mode 100644 index 00000000000..ce06c8bc269 --- /dev/null +++ b/changelogs/fragments/58064-rabbitmq_binding_ssl_options.yaml @@ -0,0 +1,2 @@ +minor_changes: + - rabbitmq_binding - added missing SSL options for HTTP GET and DELETE requests diff --git a/lib/ansible/modules/messaging/rabbitmq/rabbitmq_binding.py b/lib/ansible/modules/messaging/rabbitmq/rabbitmq_binding.py index 9ef0a904735..49cba4b1eeb 100644 --- a/lib/ansible/modules/messaging/rabbitmq/rabbitmq_binding.py +++ b/lib/ansible/modules/messaging/rabbitmq/rabbitmq_binding.py @@ -137,7 +137,7 @@ class RabbitMqBinding(object): 201: True, 204: True, } - self.api_result = self.request.get(self.url, auth=self.authentication) + self.api_result = self.request.get(self.url, auth=self.authentication, verify=self.verify, cert=(self.cert, self.key)) def run(self): """ @@ -258,7 +258,7 @@ class RabbitMqBinding(object): """ :return: """ - self.api_result = self.request.delete(self.url, auth=self.authentication) + self.api_result = self.request.delete(self.url, auth=self.authentication, verify=self.verify, cert=(self.cert, self.key)) def fail(self): """