cloud/ec2_elb module - Deregister an instance even if its already OutOfService #7131
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Type:
Bugfix Pull Request
Ansible Version:
ansible 1.6 (devel 2be8fee) last updated 2014/04/22 18:45:33 (GMT +000)
Environment:
N/A
Summary:
The current behavior of the ec2_elb module does not match the documentation. If an EC2 instance is registered with the ELB, but it's current state is OutOfService, then "state=absent" does nothing. The instance remains registered with the ELB.
Steps To Reproduce:
Create an AWS EC2 instance. Create an ELB instance and associate the EC2 instance with it. Ensure the instance is listed as OutOfService in the ELB (no need for anything to be running on the EC2 instance). Use the ec2_elb module as follows:
Expected Results:
The instance should be removed from the ELB
Actual Results:
The instance is ignored because it is in the OutOfService state. This pull request changes the behavior to be what is actually expected. This change basically boils down to: