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
bc473c5b
Commit
bc473c5b
authored
Jan 23, 2014
by
Matt Martz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support additional attributes that would allow the rax modules to work with other OpenStack clouds
parent
d7597414
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
+16
-1
lib/ansible/module_utils/rax.py
+16
-1
No files found.
lib/ansible/module_utils/rax.py
View file @
bc473c5b
...
@@ -2,11 +2,16 @@ import os
...
@@ -2,11 +2,16 @@ import os
def
rax_argument_spec
():
def
rax_argument_spec
():
auth_endpoint
=
'https://identity.api.rackspacecloud.com/v2.0/'
return
dict
(
return
dict
(
api_key
=
dict
(
type
=
'str'
,
no_log
=
True
),
api_key
=
dict
(
type
=
'str'
,
aliases
=
[
'password'
],
no_log
=
True
),
auth_endpoint
=
dict
(
type
=
'str'
,
default
=
auth_endpoint
),
credentials
=
dict
(
type
=
'str'
,
aliases
=
[
'creds_file'
]),
credentials
=
dict
(
type
=
'str'
,
aliases
=
[
'creds_file'
]),
identity_type
=
dict
(
type
=
'str'
,
default
=
'rackspace'
),
region
=
dict
(
type
=
'str'
),
region
=
dict
(
type
=
'str'
),
tenant_id
=
dict
(
type
=
'str'
),
username
=
dict
(
type
=
'str'
),
username
=
dict
(
type
=
'str'
),
verify_ssl
=
dict
(
choices
=
BOOLEANS
,
default
=
True
,
type
=
'bool'
),
)
)
...
@@ -16,9 +21,19 @@ def rax_required_together():
...
@@ -16,9 +21,19 @@ def rax_required_together():
def
setup_rax_module
(
module
,
rax_module
):
def
setup_rax_module
(
module
,
rax_module
):
api_key
=
module
.
params
.
get
(
'api_key'
)
api_key
=
module
.
params
.
get
(
'api_key'
)
auth_endpoint
=
module
.
params
.
get
(
'auth_endpoint'
)
credentials
=
module
.
params
.
get
(
'credentials'
)
credentials
=
module
.
params
.
get
(
'credentials'
)
identity_type
=
module
.
params
.
get
(
'identity_type'
)
region
=
module
.
params
.
get
(
'region'
)
region
=
module
.
params
.
get
(
'region'
)
tenant_id
=
module
.
params
.
get
(
'tenant_id'
)
username
=
module
.
params
.
get
(
'username'
)
username
=
module
.
params
.
get
(
'username'
)
verify_ssl
=
module
.
params
.
get
(
'verify_ssl'
)
rax_module
.
set_setting
(
'identity_type'
,
identity_type
)
rax_module
.
set_setting
(
'verify_ssl'
,
verify_ssl
)
rax_module
.
set_setting
(
'auth_endpoint'
,
auth_endpoint
)
if
tenant_id
:
rax_module
.
set_setting
(
'tenant_id'
,
tenant_id
)
try
:
try
:
username
=
username
or
os
.
environ
.
get
(
'RAX_USERNAME'
)
username
=
username
or
os
.
environ
.
get
(
'RAX_USERNAME'
)
...
...
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