diff --git a/lib/ansible/modules/extras/cloud/amazon/ec2_elb_facts.py b/lib/ansible/modules/extras/cloud/amazon/ec2_elb_facts.py index 8170397c80..4d0b79c394 100644 --- a/lib/ansible/modules/extras/cloud/amazon/ec2_elb_facts.py +++ b/lib/ansible/modules/extras/cloud/amazon/ec2_elb_facts.py @@ -155,7 +155,7 @@ def list_elb(connection, module): try: all_elbs = connection.get_all_load_balancers(elb_names) except BotoServerError as e: - module.fail_json(msg=get_error_message(e.args[2])) + module.fail_json(msg = "%s: %s" % (e.error_code, e.error_message)) elb_array = [] for elb in all_elbs: