From 9de952cb3f576b045adab6e7164b2023bac7a651 Mon Sep 17 00:00:00 2001 From: Trevor Pounds Date: Fri, 27 Feb 2015 01:05:47 -0800 Subject: [PATCH] Instance deregistration should try all associated ELBs. Fixes #869 --- lib/ansible/modules/cloud/amazon/ec2_elb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_elb.py b/lib/ansible/modules/cloud/amazon/ec2_elb.py index ed44a7b4b03..f5f5a487dfa 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_elb.py +++ b/lib/ansible/modules/cloud/amazon/ec2_elb.py @@ -130,9 +130,9 @@ class ElbManager: for lb in self.lbs: initial_state = self._get_instance_health(lb) if initial_state is None: - # The instance isn't registered with this ELB so just - # return unchanged - return + # Instance isn't registered with this load + # balancer. Ignore it and try the next one. + continue lb.deregister_instances([self.instance_id])