Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
82619819
Commit
82619819
authored
Apr 28, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'elb' of
https://github.com/bpennypacker/ansible
into bpennypacker-elb
parents
c9df855d
dc912ca2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
library/cloud/ec2_elb
+11
-9
No files found.
library/cloud/ec2_elb
View file @
82619819
...
...
@@ -128,19 +128,21 @@ class ElbManager:
to report it out-of-service"""
for
lb
in
self
.
lbs
:
initial_state
=
self
.
_get_instance_health
(
lb
)
if
wait
else
None
if
initial_state
and
initial_state
.
state
==
'InService'
:
lb
.
deregister_instances
([
self
.
instance_id
])
else
:
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
lb
.
deregister_instances
([
self
.
instance_id
])
# The ELB is changing state in some way. Either an instance that's
# InService is moving to OutOfService, or an instance that's
# already OutOfService is being deregistered.
self
.
changed
=
True
if
wait
:
self
.
_await_elb_instance_state
(
lb
,
'OutOfService'
,
initial_state
,
timeout
)
else
:
# We cannot assume no change was made if we don't wait
# to find out
self
.
changed
=
True
def
register
(
self
,
wait
,
enable_availability_zone
,
timeout
):
"""Register the instance for all ELBs and wait for the ELB
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment