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
1173a8d6
Commit
1173a8d6
authored
Jun 12, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch error in azure related to a failed deployment when creating a vm
parent
0b8c8b05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
library/cloud/azure
+6
-3
No files found.
library/cloud/azure
View file @
1173a8d6
...
...
@@ -301,8 +301,11 @@ def create_virtual_machine(module, azure):
module
.
fail_json
(
msg
=
"failed to create the new virtual machine, error was:
%
s"
%
str
(
e
))
deployment
=
azure
.
get_deployment_by_name
(
service_name
=
name
,
deployment_name
=
name
)
return
(
changed
,
urlparse
(
deployment
.
url
)
.
hostname
,
deployment
)
try
:
deployment
=
azure
.
get_deployment_by_name
(
service_name
=
name
,
deployment_name
=
name
)
return
(
changed
,
urlparse
(
deployment
.
url
)
.
hostname
,
deployment
)
except
WindowsAzureError
as
e
:
module
.
fail_json
(
msg
=
"failed to lookup the deployment information for
%
s, error was:
%
s"
%
(
name
,
str
(
e
)))
def
terminate_virtual_machine
(
module
,
azure
):
...
...
@@ -399,7 +402,7 @@ def main():
wait_timeout_redirects
=
int
(
module
.
params
.
get
(
'wait_timeout_redirects'
))
if
LooseVersion
(
windows_azure
.
__version__
)
<=
"0.8.0"
:
#wrapper for handling redirects which the sdk <= 0.8.0 is not following
#
wrapper for handling redirects which the sdk <= 0.8.0 is not following
azure
=
Wrapper
(
ServiceManagementService
(
subscription_id
,
management_cert_path
),
wait_timeout_redirects
)
else
:
azure
=
ServiceManagementService
(
subscription_id
,
management_cert_path
),
wait_timeout_redirects
...
...
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