summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Blonde <cblonde@xebia.fr>2013-09-08 23:36:37 +0200
committerCharles Blonde <cblonde@xebia.fr>2013-09-08 23:49:33 +0200
commit9a993992be56462dd39dba53d3d5310d324269d6 (patch)
treefc19126f28cef24b532029b9893284d52530b010
parentddb09f11be248b2eaba6bc22c10d0a50ea90a6fd (diff)
downloadansible-9a993992be56462dd39dba53d3d5310d324269d6.tar.gz
Fix wait_for conversion between String to int
-rw-r--r--library/cloud/nova_compute4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/cloud/nova_compute b/library/cloud/nova_compute
index 3252f49dc9..250f204380 100644
--- a/library/cloud/nova_compute
+++ b/library/cloud/nova_compute
@@ -135,7 +135,7 @@ def _delete_server(module, nova):
module.fail_json( msg = "Error in deleting vm: %s" % e.message)
if module.params['wait'] == 'no':
module.exit_json(changed = True, result = "deleted")
- expire = time.time() + module.params['wait_for']
+ expire = time.time() + int(module.params['wait_for'])
while time.time() < expire:
name = nova.servers.list(True, {'name': module.params['name']})
if not name:
@@ -160,7 +160,7 @@ def _create_server(module, nova):
except Exception as e:
module.fail_json( msg = "Error in creating instance: %s " % e.message)
if module.params['wait'] == 'yes':
- expire = time.time() + module.params['wait_for']
+ expire = time.time() + int(module.params['wait_for'])
while time.time() < expire:
try:
server = nova.servers.get(server.id)