Merge pull request #43435 from blueyed/boto_elb-register-currently-deregistrating

boto_elb.register_instances: do not skip instances being unregistered
This commit is contained in:
Mike Place 2017-09-22 13:36:24 -06:00 committed by GitHub
commit fc3489489e

View file

@ -517,7 +517,8 @@ def register_instances(name, instances, region=None, key=None, keyid=None,
health = __salt__['boto_elb.get_instance_health'](
name, region, key, keyid, profile)
nodes = [value['instance_id'] for value in health]
nodes = [value['instance_id'] for value in health
if value['description'] != 'Instance deregistration currently in progress.']
new = [value for value in instances if value not in nodes]
if not len(new):
msg = 'Instance/s {0} already exist.'.format(str(instances).strip('[]'))