From 848e9de95015092da289ddcdbdd28a9a09e833ef Mon Sep 17 00:00:00 2001 From: Robb Wagoner Date: Thu, 2 Jul 2015 06:16:43 -0700 Subject: [PATCH] remove double dict & fix increment bug --- lib/ansible/modules/cloud/amazon/ec2_elb_lb.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_elb_lb.py b/lib/ansible/modules/cloud/amazon/ec2_elb_lb.py index 643163aad1f..7b0afde29c3 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_elb_lb.py +++ b/lib/ansible/modules/cloud/amazon/ec2_elb_lb.py @@ -393,11 +393,11 @@ class ElbManager(object): # status of instances behind the ELB if info['instances']: - info['instance_health'] = [ dict({ - "instance_id": instance_state.instance_id, - "reason_code": instance_state.reason_code, - "state": instance_state.state, - }) for instance_state in self.elb_conn.describe_instance_health(self.name)] + info['instance_health'] = [ dict( + instance_id = instance_state.instance_id, + reason_code = instance_state.reason_code, + state = instance_state.state + ) for instance_state in self.elb_conn.describe_instance_health(self.name)] else: info['instance_health'] = [] @@ -409,7 +409,7 @@ class ElbManager(object): elif instance_state['state'] == "OutOfService": info['out_of_service_count'] += 1 else: - info['unknown_instance_state_count'] =+ 1 + info['unknown_instance_state_count'] += 1 if check_elb.health_check: info['health_check'] = {