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
6c6dd09e
Commit
6c6dd09e
authored
Nov 18, 2013
by
Matt Martz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability to specify a VirtualIP ID for sharing a VIP with another LB
parent
5c504210
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
library/cloud/rax_clb
+9
-3
No files found.
library/cloud/rax_clb
View file @
6c6dd09e
...
...
@@ -74,6 +74,10 @@ options:
username:
description:
- Rackspace username (overrides C(credentials))
vip_id:
description:
- Virtual IP ID to use when creating the load balancer for purposes of
sharing an IP with another load balancer of another protocol
wait:
description:
- wait for the balancer to be in state 'running' before returning
...
...
@@ -160,7 +164,7 @@ def to_dict(obj):
def
cloud_load_balancer
(
module
,
state
,
name
,
meta
,
algorithm
,
port
,
protocol
,
vip_type
,
timeout
,
wait
,
wait_timeout
):
vip_type
,
timeout
,
wait
,
wait_timeout
,
vip_id
):
for
arg
in
(
state
,
name
,
port
,
protocol
,
vip_type
):
if
not
arg
:
module
.
fail_json
(
msg
=
'
%
s is required for rax_clb'
%
arg
)
...
...
@@ -189,7 +193,7 @@ def cloud_load_balancer(module, state, name, meta, algorithm, port, protocol,
if
not
balancers
:
try
:
virtual_ips
=
[
clb
.
VirtualIP
(
type
=
vip_type
)]
virtual_ips
=
[
clb
.
VirtualIP
(
type
=
vip_type
,
id
=
vip_id
)]
balancer
=
clb
.
create
(
name
,
metadata
=
metadata
,
port
=
port
,
algorithm
=
algorithm
,
protocol
=
protocol
,
timeout
=
timeout
,
virtual_ips
=
virtual_ips
)
...
...
@@ -279,6 +283,7 @@ def main():
state
=
dict
(
default
=
'present'
,
choices
=
[
'present'
,
'absent'
]),
timeout
=
dict
(
type
=
'int'
,
default
=
30
),
type
=
dict
(
choices
=
[
'PUBLIC'
,
'SERVICENET'
],
default
=
'PUBLIC'
),
vip_id
=
dict
(),
wait
=
dict
(
type
=
'bool'
),
wait_timeout
=
dict
(
default
=
300
),
)
...
...
@@ -296,6 +301,7 @@ def main():
protocol
=
module
.
params
.
get
(
'protocol'
)
state
=
module
.
params
.
get
(
'state'
)
timeout
=
int
(
module
.
params
.
get
(
'timeout'
))
vip_id
=
module
.
params
.
get
(
'vip_id'
)
vip_type
=
module
.
params
.
get
(
'type'
)
wait
=
module
.
params
.
get
(
'wait'
)
wait_timeout
=
int
(
module
.
params
.
get
(
'wait_timeout'
))
...
...
@@ -303,7 +309,7 @@ def main():
setup_rax_module
(
module
,
pyrax
)
cloud_load_balancer
(
module
,
state
,
name
,
meta
,
algorithm
,
port
,
protocol
,
vip_type
,
timeout
,
wait
,
wait_timeout
)
vip_type
,
timeout
,
wait
,
wait_timeout
,
vip_id
)
# import module snippets
...
...
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