From ef0f0ce4d862cee8a30d1be3a2871ad3fb02c361 Mon Sep 17 00:00:00 2001 From: Andrew Roth Date: Fri, 14 Jun 2024 15:57:05 -0400 Subject: [PATCH] fix error in module iam_server_certificate for _compare_cert --- plugins/modules/iam_server_certificate.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/modules/iam_server_certificate.py b/plugins/modules/iam_server_certificate.py index 6a7734acacb..78a56ccece4 100644 --- a/plugins/modules/iam_server_certificate.py +++ b/plugins/modules/iam_server_certificate.py @@ -137,12 +137,8 @@ def _compare_cert(cert_a, cert_b): # Trim out the whitespace before comparing the certs. While this could mean # an invalid cert 'matches' a valid cert, that's better than some stray # whitespace breaking things - cert_a.replace("\r", "") - cert_a.replace("\n", "") - cert_a.replace(" ", "") - cert_b.replace("\r", "") - cert_b.replace("\n", "") - cert_b.replace(" ", "") + cert_a = cert_a.replace("\r", "").replace("\n", "").replace(" ", "") + cert_b = cert_b.replace("\r", "").replace("\n", "").replace(" ", "") return cert_a == cert_b