From fd8cc775a7a9f00aca77dfb5272e732382ab9388 Mon Sep 17 00:00:00 2001 From: Ryan Brown Date: Tue, 19 Jun 2018 14:28:43 -0400 Subject: [PATCH] [aws] Simplify conditional in iam_cert module (#41691) --- lib/ansible/modules/cloud/amazon/iam_cert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/iam_cert.py b/lib/ansible/modules/cloud/amazon/iam_cert.py index 5cb102d992..7bc5aa07dd 100644 --- a/lib/ansible/modules/cloud/amazon/iam_cert.py +++ b/lib/ansible/modules/cloud/amazon/iam_cert.py @@ -155,7 +155,7 @@ def dup_check(module, iam, name, new_name, cert, orig_cert_names, orig_cert_bodi elif slug_cert.startswith(slug_orig_cert_bodies): update = True break - elif slug_orig_cert_bodies != slug_cert: + else: module.fail_json(changed=False, msg='A cert with the name %s already exists and' ' has a different certificate body associated' ' with it. Certificates cannot have the same name' % orig_cert_names[c_index])