From b1d6802d71dabc1ed8bb357c28ed7b03673ef0ee Mon Sep 17 00:00:00 2001 From: Uwila Date: Thu, 23 Aug 2018 18:14:51 +0200 Subject: [PATCH] Fix ignoring of 'Login Profile cannot be found' errors in iam (#43198) --- lib/ansible/modules/cloud/amazon/iam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/iam.py b/lib/ansible/modules/cloud/amazon/iam.py index 385af9540d5..ad50ada4469 100644 --- a/lib/ansible/modules/cloud/amazon/iam.py +++ b/lib/ansible/modules/cloud/amazon/iam.py @@ -254,7 +254,7 @@ def delete_dependencies_first(module, iam, name): changed = True except boto.exception.BotoServerError as err: error_msg = boto_exception(err) - if 'Cannot find Login Profile' not in error_msg: + if 'Login Profile for User ' + name + ' cannot be found.' not in error_msg: module.fail_json(changed=changed, msg="Failed to delete login profile: %s" % err, exception=traceback.format_exc()) # try to detach policies