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
3a635d2d
Commit
3a635d2d
authored
May 24, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lots of formatting fixes
parent
9c5d6f11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
19 additions
and
20 deletions
+19
-20
lib/ansible/runner/action_plugins/fetch.py
+0
-0
library/cloud/glance_image
+1
-1
library/cloud/nova_compute
+1
-1
library/cloud/quantum_floating_ip
+0
-0
library/cloud/quantum_floating_ip_associate
+1
-1
library/cloud/quantum_network
+1
-1
library/cloud/quantum_router
+4
-7
library/cloud/quantum_router_gateway
+0
-0
library/cloud/quantum_router_interface
+1
-1
library/cloud/quantum_subnet
+10
-8
library/packaging/apt_repository
+0
-0
No files found.
lib/ansible/runner/action_plugins/fetch.py
View file @
3a635d2d
library/cloud/glance_image
View file @
3a635d2d
...
...
@@ -179,7 +179,7 @@ def _glance_image_create(module, params, client):
break
time
.
sleep
(
5
)
except
Exception
as
e
:
module
.
fail_json
(
msg
=
"Error in creating image:
%
s"
%
e
.
message
)
module
.
fail_json
(
msg
=
"Error in creating image:
%
s"
%
e
.
message
)
if
image
.
status
==
'active'
:
module
.
exit_json
(
changed
=
True
,
result
=
image
.
status
,
id
=
image
.
id
)
else
:
...
...
library/cloud/nova_compute
View file @
3a635d2d
...
...
@@ -152,7 +152,7 @@ def _create_server(module, nova):
if
not
module
.
params
[
'key_name'
]:
del
bootkwargs
[
'key_name'
]
try
:
server
=
nova
.
servers
.
create
(
*
bootargs
,
**
bootkwargs
)
server
=
nova
.
servers
.
create
(
*
bootargs
,
**
bootkwargs
)
server
=
nova
.
servers
.
get
(
server
.
id
)
except
Exception
as
e
:
module
.
fail_json
(
msg
=
"Error in creating instance:
%
s "
%
e
.
message
)
...
...
library/cloud/quantum_floating_ip
View file @
3a635d2d
library/cloud/quantum_floating_ip_associate
View file @
3a635d2d
...
...
@@ -121,7 +121,7 @@ def _get_server_state(module, nova):
info
=
server
.
_info
if
info
[
'name'
]
==
module
.
params
[
'instance_name'
]:
if
info
[
'status'
]
!=
'ACTIVE'
and
module
.
params
[
'state'
]
==
'present'
:
module
.
fail_json
(
msg
=
"The VM is available but not Active. state:"
+
info
[
'status'
])
module
.
fail_json
(
msg
=
"The VM is available but not Active. state:"
+
info
[
'status'
])
server_info
=
info
break
except
Exception
as
e
:
...
...
library/cloud/quantum_network
View file @
3a635d2d
...
...
@@ -154,7 +154,7 @@ def _set_tenant_id(module):
for
tenant
in
_os_keystone
.
tenants
.
list
():
if
tenant
.
name
==
tenant_name
:
_os_tenant_id
=
tenant
.
id
break
;
break
if
not
_os_tenant_id
:
module
.
fail_json
(
msg
=
"The tenant id cannot be found, please check the paramters"
)
...
...
library/cloud/quantum_router
View file @
3a635d2d
...
...
@@ -127,7 +127,7 @@ def _set_tenant_id(module):
for
tenant
in
_os_keystone
.
tenants
.
list
():
if
tenant
.
name
==
login_tenant_name
:
_os_tenant_id
=
tenant
.
id
break
;
break
if
not
_os_tenant_id
:
module
.
fail_json
(
msg
=
"The tenant id cannot be found, please check the paramters"
)
...
...
@@ -152,7 +152,7 @@ def _create_router(module, quantum):
'admin_state_up'
:
module
.
params
[
'admin_state_up'
],
}
try
:
new_router
=
quantum
.
create_router
({
'router'
:
router
}
)
new_router
=
quantum
.
create_router
(
dict
(
router
=
router
)
)
except
Exception
as
e
:
module
.
fail_json
(
msg
=
"Error in creating router:
%
s"
%
e
.
message
)
return
new_router
[
'router'
][
'id'
]
...
...
@@ -191,13 +191,10 @@ def main():
else
:
router_id
=
_get_router_id
(
module
,
quantum
)
if
not
router_id
:
module
.
exit_json
(
changed
=
False
,
result
=
"success"
)
module
.
exit_json
(
changed
=
False
,
result
=
"success"
)
else
:
_delete_router
(
module
,
quantum
,
router_id
)
module
.
exit_json
(
changed
=
True
,
result
=
"deleted"
)
module
.
exit_json
(
changed
=
True
,
result
=
"deleted"
)
# this is magic, see lib/ansible/module.params['common.py
#<<INCLUDE_ANSIBLE_MODULE_COMMON>>
...
...
library/cloud/quantum_router_gateway
View file @
3a635d2d
library/cloud/quantum_router_interface
View file @
3a635d2d
...
...
@@ -127,7 +127,7 @@ def _set_tenant_id(module):
for
tenant
in
_os_keystone
.
tenants
.
list
():
if
tenant
.
name
==
login_tenant_name
:
_os_tenant_id
=
tenant
.
id
break
;
break
if
not
_os_tenant_id
:
module
.
fail_json
(
msg
=
"The tenant id cannot be found, please check the paramters"
)
...
...
library/cloud/quantum_subnet
View file @
3a635d2d
...
...
@@ -155,7 +155,7 @@ def _set_tenant_id(module):
for
tenant
in
_os_keystone
.
tenants
.
list
():
if
tenant
.
name
==
tenant_name
:
_os_tenant_id
=
tenant
.
id
break
;
break
if
not
_os_tenant_id
:
module
.
fail_json
(
msg
=
"The tenant id cannot be found, please check the paramters"
)
...
...
@@ -205,16 +205,18 @@ def _create_subnet(module, quantum):
}
if
module
.
params
[
'allocation_pool_start'
]
and
module
.
params
[
'allocation_pool_end'
]:
allocation_pools
=
[
{
'start'
:
module
.
params
[
'allocation_pool_start'
],
'end'
:
module
.
params
[
'allocation_pool_end'
]}
{
'start'
:
module
.
params
[
'allocation_pool_start'
],
'end'
:
module
.
params
[
'allocation_pool_end'
]
}
]
subnet
.
update
({
'allocation_pools'
:
allocation_pools
})
if
not
module
.
params
[
'gateway_ip'
]:
subnet
.
pop
(
'gateway_ip'
)
try
:
new_subnet
=
quantum
.
create_subnet
({
'subnet'
:
subnet
}
)
except
Exception
as
e
:
module
.
fail_json
(
msg
=
"Failure in creating subnet:
%
s"
%
e
.
message
)
new_subnet
=
quantum
.
create_subnet
(
dict
(
subnet
=
subnet
)
)
except
Exception
,
e
:
module
.
fail_json
(
msg
=
"Failure in creating subnet:
%
s"
%
e
.
message
)
return
new_subnet
[
'subnet'
][
'id'
]
...
...
@@ -259,10 +261,10 @@ def main():
else
:
subnet_id
=
_get_subnet_id
(
module
,
quantum
)
if
not
subnet_id
:
module
.
exit_json
(
changed
=
False
,
result
=
"success"
)
module
.
exit_json
(
changed
=
False
,
result
=
"success"
)
else
:
_delete_subnet
(
module
,
quantum
,
subnet_id
)
module
.
exit_json
(
changed
=
True
,
result
=
"deleted"
)
module
.
exit_json
(
changed
=
True
,
result
=
"deleted"
)
# this is magic, see lib/ansible/module.params['common.py
#<<INCLUDE_ANSIBLE_MODULE_COMMON>>
...
...
library/packaging/apt_repository
View file @
3a635d2d
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