Merge pull request #1469 from Constantin07/update_elb_ec2_facts

ec2_elb_facts - Print explicit error cause when no ELBs are found in AWS
reviewable/pr18780/r1
Brian Coca 9 years ago
commit 2813675b6f

@ -157,7 +157,7 @@ def list_elb(connection, module):
try: try:
all_elbs = connection.get_all_load_balancers(elb_names) all_elbs = connection.get_all_load_balancers(elb_names)
except BotoServerError as e: 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 = [] elb_array = []
for elb in all_elbs: for elb in all_elbs:

Loading…
Cancel
Save