mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix ignoring of 'Login Profile cannot be found' errors in iam (#43198)
This commit is contained in:
@@ -254,7 +254,7 @@ def delete_dependencies_first(module, iam, name):
|
|||||||
changed = True
|
changed = True
|
||||||
except boto.exception.BotoServerError as err:
|
except boto.exception.BotoServerError as err:
|
||||||
error_msg = boto_exception(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())
|
module.fail_json(changed=changed, msg="Failed to delete login profile: %s" % err, exception=traceback.format_exc())
|
||||||
|
|
||||||
# try to detach policies
|
# try to detach policies
|
||||||
|
|||||||
Reference in New Issue
Block a user