diff options
author | Michael DeHaan <michael.dehaan@gmail.com> | 2013-09-09 07:48:21 -0700 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2013-09-09 07:48:21 -0700 |
commit | 59099b7607c2c94efbbb35bdc4b55cf005c047e1 (patch) | |
tree | 51a7a2f2c2b4d460ad766d2a5690ed33b8fdff95 | |
parent | ddb09f11be248b2eaba6bc22c10d0a50ea90a6fd (diff) | |
parent | 02171711fa27fc6cc73e540a7f6b2b73effd6a93 (diff) | |
download | ansible-59099b7607c2c94efbbb35bdc4b55cf005c047e1.tar.gz |
Merge pull request #4065 from CharlesBlonde/nova_wait_for_bug
Nova_compute wait_for fixes
-rw-r--r-- | library/cloud/nova_compute | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/cloud/nova_compute b/library/cloud/nova_compute index 3252f49dc9..5b43115fbd 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) @@ -220,7 +220,7 @@ def main(): nics = dict(default=None), meta = dict(default=None), wait = dict(default='yes', choices=['yes', 'no']), - wait_for = dict(default=120), + wait_for = dict(default=180), state = dict(default='present', choices=['absent', 'present']) ), ) |