From 0d179c77a74b79b46784f90ab271c6503b9cb8cb Mon Sep 17 00:00:00 2001 From: MaciejCetler Date: Wed, 28 Jun 2017 17:11:19 +0200 Subject: [PATCH] fix for iam (#23347) * fix for iam * Update iam.py removed extra space --- lib/ansible/modules/cloud/amazon/iam.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/cloud/amazon/iam.py b/lib/ansible/modules/cloud/amazon/iam.py index 050764b056..197a9a60d0 100644 --- a/lib/ansible/modules/cloud/amazon/iam.py +++ b/lib/ansible/modules/cloud/amazon/iam.py @@ -510,6 +510,8 @@ def create_role(module, iam, name, path, role_list, prof_list, trust_policy_doc) instance_profile_result = iam.create_instance_profile(name, path=path).create_instance_profile_response.create_instance_profile_result.instance_profile iam.add_role_to_instance_profile(name, name) + else: + instance_profile_result = iam.get_instance_profile(name).get_instance_profile_response.get_instance_profile_result.instance_profile except boto.exception.BotoServerError as err: module.fail_json(changed=changed, msg=str(err)) else: